azure-functions-host: Proxies with wildcards don't work with parameters
Given a proxies.json file like this:
{
"$schema": "http://json.schemastore.org/proxies",
"proxies": {
"api": {
"matchCondition": {
"route": "/api/{*restOfPath}"
},
"backendUri": "https://localhost/api/{restOfPath}"
}
}
}
Calling a function with an http trigger and a route with a parameter, such as “test/{id}”, with a url like “test/123” results in an error:
System.Private.CoreLib: Exception while executing function: Test. Microsoft.Azure.WebJobs.Host: Exception binding parameter 'id'. Microsoft.Azure.WebJobs.Host: Binding data does not contain expected value 'id'.
This works with a v1 function app. Does not work with v2 function app (either 2.0.12115.0 or 2.0.12134.0).
Workaround is to create a proxy for each endpoint that has a binding parameter.
About this issue
- Original URL
- State: open
- Created 6 years ago
- Comments: 29 (5 by maintainers)
Some workaround in the meantime: