Reputation: 4637
In Azure API Management, when request is passed on to the backend service, whats the best way of accessing original URL? For example the end user might request something like https://xxxx.azure-api.net/v1.4 Which is passed on to a backend service which could be hosted under https://example.com. End system needs to know the original Host client requested.
Upvotes: 0
Views: 4576
Reputation: 7795
The most simple way to do that is indeed with policy:
<set-header name="X-Forwarded-Host" exists-action="override">
<value>@(context.Request.OriginalUrl.ToUri().Host)</value>
</set-header>
Upvotes: 5