Mapping: Route Variables vs Global Variables
Use route variables for one-off overrides and global variables for cross-route defaults.
When to use this
What this does not do
Repo-grounded example
{
"variables": { "region": "eu-west-1" },
"paths": [
{
"method": "GET",
"path": "/proxy/{.+}",
"auth": true,
"integration": { "type": "http_proxy", "server": "upstream" },
"mapping": {
"headers": {
"x-user-id": "$request.jwt.sub",
"x-region": "$config.region"
},
"query": {
"source": "$request.query.source"
}
},
"variables": { "api_key": "internal-key" }
}
]
}Troubleshooting
Related docs
Last updated