Application Gateway Update HTTP_HOST server variable

Mohit Kumar Sharma 86 Reputation points
2021-04-30T07:34:13.103+00:00

Hi Team,

is it possible to update HTTP_HOTS SERVER variable value in azure application gateway or apache2?

Azure Web Application Firewall
{count} votes

1 answer

Sort by: Most helpful
  1. GitaraniSharma-MSFT 49,586 Reputation points Microsoft Employee
    2021-05-05T10:10:37.31+00:00

    Hello @Mohit Kumar Sharma ,

    Application gateway supports the "host" server variable.

    host : In this order of precedence: the host name from the request line, the host name from the Host request header field, or the server name matching a request. Example: In the request http://contoso.com:8080/article.aspx?id=123&title=fabrikam, host value will be is contoso.com

    And you can update this in Application gateway using header rewrite.

    Please refer : https://learn.microsoft.com/en-us/azure/application-gateway/rewrite-http-headers-url#server-variables

    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.

    0 comments No comments

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.