Hello @Matthew Jung ,
I understand that you've configured an Azure Front Door with backend virtual machines and when you try to access the default frontend host of your Azure Front Door, it redirects to the backend VM's IP address.
I requested you to share the screenshots of your configuration for further investigation and I setup a lab with Azure Front Door Standard and a backend VM behind it with similar settings as you and it worked fine without exposing the backend VM IP.
But in your case, I see the Front Door URL is receiving a HTTP 302 redirect response as below:
And you can see the location header, where the redirects being sent from the app are using the ip address/login URL, and not a request path or the frontend hostname of your Azure Front door.
This means that any time you are redirected via a 302 status using a location header, your browser will be requesting to connect directly to the backend rather than having the front door act as a reverse proxy.
This is due to "Absolute URL redirects," where the server (backend VM in this case) sends the client a full URL in the location header rather than just a request path, which is called a "Relative URL redirect."
According to https://www.seoclarity.net/resources/knowledgebase/difference-relative-absolute-url-15325/
An absolute URL contains the entire address from the protocol (HTTPS) to the domain name (www.example.com ) and includes the location within your website in your folder system (/foldernameA or /foldernameB) names within the URL.
The relative URL, on the other hand, does not use the full web address and only contains the location following the domain. It assumes that the link you add is on the same site and is part of the same root domain.
To fix this, you could do one of the following:
- Add Custom Domain. Refer: https://learn.microsoft.com/en-us/azure/frontdoor/standard-premium/how-to-add-custom-domain
- Change code of app. Refer: [http://nginx.org/en/docs/http/ngx_http_sub_module.html]
Could you please check this redirect in your application and try to fix the code?
If not possible, then the only way is to use custom domain in this case.
Kindly let us know if the above helps or you need further assistance on this issue.
Please "Accept the answer" if the information helped you. This will help us and others in the community as well.