Do we have other approach other than Front Door for changing the domain of APIM?

HKPR 41 Reputation points
2023-04-01T15:46:49.6366667+00:00

Primary Domain is Azure Function URL

Secondary Domain in Azure App Service URL

How can I achieve the redirection of requests from primary domain to secondary domain without using Front Door, like APIM Polices etc.?

Azure API Management
Azure API Management
An Azure service that provides a hybrid, multi-cloud management platform for APIs.
2,327 questions
{count} votes

1 answer

Sort by: Most helpful
  1. MuthuKumaranMurugaachari-MSFT 22,416 Reputation points
    2023-04-04T13:53:31.09+00:00

    HKPR Thanks for posting your question in Microsoft Q&A. I assume you have setup an API to call Azure Function App and would like to redirect to App Service URL in Azure API Management. Is that correct? You can use return-response policy to perform the redirection of requests by setting status code (based on your need: Redirection messages) and location header and here is the doc reference: Return Response. We have similar discussion in other thread and sharing code snippet for reference:

    <inbound>  
            <return-response>  
                <set-status code="303" reason="Redirecting" />  
                <set-header name="Location" exists-action="override">  
                    <value>@("https://app-service-url/")</value>  
                </set-header>  
            </return-response>  
            <base />  
    </inbound>
    

    I hope this helps with your question and let me know if you have any other.

    0 comments No comments

Your answer

Answers can be marked as Accepted Answers by the question author, which helps users to know the answer solved the author's problem.