'Azure App Gateway Missing Forward Headers

I have setup an Azure App Gateway WAF v2 instance in front of my asp.net web api running on Azure App Service. In order to get this to work, I had to turn on the following option in the backend setting in the rule in AG:

Azure App Gateway Backend Setting

I have Http Logging turned on in my asp.net web api. I am trying to debug/troubleshoot the headers to determine how to get NSwag to render the proper server and base url, however I do not see any of the following headers present which according to this article should be present:

  • x-forwarded-for
  • x-forwarded-proto

I do see the following headers:

  • x-original-for
  • x-original-proto
  • x-original-host
  • x-original-url

Any ideas on what is missing?

Thanks!



Sources

This article follows the attribution requirements of Stack Overflow and is licensed under CC BY-SA 3.0.

Source: Stack Overflow

Solution Source