I have an app function in Azure that is behind a front door. The front door uses a custom domain which has a CNAME record setup with our DNS provider.
The app uses MS Authentication when you access it.
What happens is that when I access the URL of the front door (https://website.domain.com), it directs you to the log in page as expected, I log in and then get directed to the app. All good, but rather than displaying and being from the original URL, it pushes me to a azurewebsites.net URL. We are going to be doing API calls via front door and need the replies to be from the custom domain URL.
As a test, I set up another front door in the same with an app function without authentication and this behaves as expected (app function continues to use the custom domain from the front door).
I have tried to set a custom domain on the app - no dice. I have tried changing the header in the back end of front door - this makes the access to the app stop completely. I have tried adding post_login_redirect_url to the app configuration and pointing it to the custom domain URL - no dice.
There must be a way for this to work? Has anyone managed to successfully manage this? Thanks.