Azure Functions Proxies support the usage of AppSettings in the backendUri and request.headers in requestOverrides.
{
"$schema": "http://json.schemastore.org/proxies",
"proxies": {
"myProxyName": {
"matchCondition": {
"route": "/"
},
"backendUri": "%MY_APP_SETTING%",
"requestOverrides": {
"backend.request.headers.myCustomHeader":"request.headers.host"
}
}
}
}
Question: is it possible to use a request.header value in the backendUri?
{
"$schema": "http://json.schemastore.org/proxies",
"proxies": {
"myProxyName": {
"matchCondition": {
"route": "/"
},
"backendUri": "%MY_APP_SETTING%/{request.headers.my_header_value}"
}
}
}
Yes it is Possible to use request.header value in backend uri.
Below is the sample code with related information
Also check the Function Proxy and Backend URI with the related discussions.