App Gateway with Azure Static App as Back-end - URL Redirection

Taranjeet Malik 611 Reputation points
2021-05-20T02:59:28.12+00:00

Hi Folks

We’ve deployed an Application Gateway with WAF and front-end Public IP in front of a Static Web App. The Static Web App has the default Azure assigned name (something.azurestaticapps.net) and the custom name of the application is abc.xyz.com. It’s an Azure-only environment, meaning there’s no AD DS (on-prem) and so AAD is used for authentication.

We’ve added custom domain (abc.xyz.com as TXT and www.abc.xyz.com as CNAME as per guidance here https://learn.microsoft.com/en-gb/azure/static-web-apps/custom-domain?wt.mc_id=azurestaticwebapps_inline_inproduct_general&tabs=azure-dns#add-domain-using-txt-record-validation)

The issue we’re facing is that when an Internet user browse for the app abc.xyz.com, after the authentication passes (so AAD is out of picture), the URL in the browser automatically changes to something.azurestaticapps.net:80 and it generates the following error:

98101-azure-static-app-issue.png

I’ve followed the guidance in the articles:

https://learn.microsoft.com/en-us/azure/application-gateway/troubleshoot-app-service-redirection-app-service-url

https://learn.microsoft.com/en-us/azure/application-gateway/rewrite-http-headers-url#modify-a-redirection-url

However, the issue still persists. Any pointers if someone has already seen / resolve this issue.

Thanks
Taranjeet Singh

Azure Application Gateway
Azure Application Gateway
An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.
Azure Web Application Firewall
Azure Static Web Apps
Azure Static Web Apps
An Azure service that provides streamlined full-stack web app development.
{count} vote

1 answer

Sort by: Most helpful
  1. Anuraj Parameswaran 166 Reputation points MVP
    2022-06-26T15:06:13.787+00:00

    I am also facing the issue with SSL - In my scenario it is my machine's antivirus is causing the problem. Can you try setting the custom domain as the default one and check whether the issue persist?

    215067-set-default.png

    0 comments No comments

Your answer

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