Azure APIM how to change the request url

3.7k views Asked by At

I am trying to forward a request from Azure Frontdoor to a backend service that is evaluating the original SAML token. Because that token has an assertion value that is different then expected the app service is the request fails because Frontdoor sends the request to APIM first before the request goes to the app service. Is there a way to have APIM act as a pass-through and keep all request header values from the original requester (in this case Frontdoor) and passed these values to the app service for validation?

1

There are 1 answers

0
kfrosty On

I'm not sure I understand exactly what you are asking but if you need to manipulate and change URL's, look into API policies. For example, you could use an outbound policy along with find and replace to change URLs.

<policies>
    <inbound>
        <base />
    </inbound>
    <backend>
        <base />
    </backend>
    <outbound>
        <base />
         <find-and-replace from="apim.acme.com" to ="backend.acme.com />
    </outbound>
    <on-error>
        <base />
    </on-error>
</policies>

Start here https://learn.microsoft.com/en-us/azure/api-management/api-management-transformation-policies