Application Gateway no longer sending the X-Original-Host header

Julien Rousselle 20 Reputation points
2025-06-11T10:41:35.24+00:00

Hello,

I have a setup where an application gateway is in front of a container app. Everything is deployed via a bicep file.

In the container app, I have a blazor server app, wich uses Microsoft Entra as identity provider.

In my app configuration, I have this:

app.UseForwardedHeaders(new ForwardedHeadersOptions
{
    ForwardedHeaders = ForwardedHeaders.XForwardedProto | ForwardedHeaders.XForwardedHost,
    // The Azure Application Gateay will set the forwarded host in "x-original-host" instead of default "X-Forwarded-Host"
    ForwardedHostHeaderName = "x-original-host"
});

So, my backend use the x-original-host header usually set by the Application Gateway to redirect the user to the "public url" rather than the internal container app url after login.

Since this morning, the x-original-host header is no longer sent to my backend. The only change was an updated version number in my .csproj (Which trigger the deployement using the bicep file)

Do you have any idea why that header would no longer be sent ? Did Microsoft changed something ?

Regards,

Julien

Azure Application Gateway
Azure Application Gateway
An Azure service that provides a platform-managed, scalable, and highly available application delivery controller as a service.
1,215 questions
{count} votes

Accepted answer
  1. Ganesh Patapati 6,915 Reputation points Microsoft External Staff Moderator
    2025-06-12T08:56:52.5366667+00:00

    Hello @Julien Rousselle

    I'm glad that you were able to resolve your issue and thank you for posting your solution so that others experiencing the same thing can easily reference this!

    Since the Microsoft Q&A community has a policy that "The question author cannot accept their own answer. They can only accept answers by others", I'll repost your solution.

    Please click "Accept" the answer as original posters help the community find answers faster by identifying the correct answer.

    Issue: Application Gateway no longer sending the X-Original-Host header

    Resolution: I finally found out that the issue was not front the application gateway, but rather the version of the base docker image I used for my dotnet app. Looks like the x-original-host header was no longer used by my app) (See: https://github.com/dotnet/dotnet-docker/issues/6490)

    You informed us that after recreating the Backend pool, your problem was resolved.


    Please do not forget to "Accept the answer” and “Up-vote” wherever the information provided helps you, this can be beneficial to other community members.      

    User's image

    If you have any other questions or are still running into more issues, let me know in the "comments" and I would be happy to help you.


0 additional answers

Sort by: Most helpful

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.