Mapping And Variables
Use mapping when the upstream needs transformed headers or query params rather than the original client request. The mapping block lets you select specific
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