Due to certain customer requirements our Azure API Management must be able to handle GET requests with URLs containing hash signs (#). Alas, I can't find a way to make it work.
So, let's imagine there is a following url template:
/products/{id}/items
, where {id}
is a string which may contain #.
What I did is that {id} is encoded when called from the web application, so example call to the APIM is:
https://contoso.apim.com/products/some%23id/items
, where %23 is encoded # sign.
Such url is handled correctly when used against actual API (which, btw. is a .net core 3 api deployed to Service Fabric cluster), however when used via APIM management, request returns 404 FABRIC_E_SERVICE_DOES_NOT_EXIST error.
If I were to replace %23 with any other encoded value, e.g. %20, uri template would be correctly matched and hit underlying API.
After running some APIM request traces, I can definitely confirm that url thats being forwarded to the backend from APIM is not trimmed or changed in any way.
Any suggestion how to solve this would be much appreciated.
set-backend-service
policy? – Anton Komyshan