question

MohitKumarSharma-1566 avatar image
0 Votes"
MohitKumarSharma-1566 asked GitaraniSharmaMSFT-4262 commented

Application Gateway Update HTTP_HOST server variable

Hi Team,

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

azure-web-application-firewall
· 1
5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.

Hello @MohitKumarSharma-1566 ,

Just checking in to see if the below answer helped. If this answers your query, please don’t forget to click "Accept the answer" and Up-Vote for the same, which might be beneficial to other community members reading this thread. And, if you have any further query do let us know.

Thanks,
Gita

0 Votes 0 ·

1 Answer

GitaraniSharmaMSFT-4262 avatar image
0 Votes"
GitaraniSharmaMSFT-4262 answered

Hello @MohitKumarSharma-1566 ,

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://docs.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.

5 |1600 characters needed characters left characters exceeded

Up to 10 attachments (including images) can be used with a maximum of 3.0 MiB each and 30.0 MiB total.