I see this is related to the thread Is it possible to use .azurewebsites.net domain with application gateway?
Can you please be more specific
- What exactly do you mean by "access my API via the frontend"? Is this some third party Frontend or your own Frontend
- The error message you shared seems to be related to the "Frontend" 's implementation.
- As you mentioned, the configuration works with PostMan but the "Frontend" throws this error,
- Doesn't that mean the error is specific to the "Frontend"
- I would suggest you review the Frontend's logs or reach out to the Frontend vendor to understand what this error means
A simple web search indicates that this could be related to a site serving a mix of HTTPS and HTTP Content.
- If your application/Frontend has a requirement for HTTPS, you can consider using a custom domain.
- See : end-to-end TLS encryption.
Alternatively, you can consider using Azure Front Door which provides HTTPS capability even on the default domain.
NOTE :
- Using default domains or two different domains (one in proxy such as AFD/AppGW and one in the backend such as AppService) is not recommended as this could lead to potential issues such as
- Incorrect absolute URLs
- Incorrect redirect URLs
- Broken cookies
- A detailed explanation is provided here : Host Name Preservation
- Incorrect redirect URLs
- Incorrect absolute URLs
The Implementation guidance from Azure would be to use a custom domain
Hope this helps
Thanks,
Kapil