Mapping: Route Variables vs Global Variables
Use route variables for one-off overrides and global variables for cross-route defaults. Global variables in the top-level `variables` block apply to all
When to use this
Key concepts
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