How can we improve Azure Networking?

Support for dropping port out of x-forwarded-for header

Hi,

I've seen some compatibility issues with the x-forwarded-for header as it comes in on the format IP:Port rather than just IP. It would be useful to be able to adjust this header to just provide IP without the port. I think this should be adjustable, so IP:Port or just IP being available options rather than just one or the other.

This would help x-forwarded-for being easy to parse on systems that only expect the IP to be sent through.

Thanks,

Neil

160 votes
Vote
Sign in
(thinking…)
Sign in with: oidc
Signed in as (Sign out)
You have left! (?) (thinking…)
Neil B shared this idea  ·   ·  Flag idea as inappropriate…  ·  Admin →

This can now be accomplished using the Header Rewrite capability (https://azure.microsoft.com/en-us/blog/rewrite-http-headers-with-azure-application-gateway) available with Application Gateway’s V2 SKU. Please see details here:
https://docs.microsoft.com/en-us/azure/application-gateway/rewrite-http-headers#remove-port-information-from-the-x-forwarded-for-header

Thanks,
Abhave

8 comments

Sign in
(thinking…)
Sign in with: oidc
Signed in as (Sign out)
Submitting...

Feedback and Knowledge Base