Real life usage of the X-Forwarded-Host header?

前端 未结 7 557
予麋鹿
予麋鹿 2021-01-30 05:09

I\'ve found some interesting reading on the X-Forwarded-* headers, including the Reverse Proxy Request Headers section in the Apache documentation, as well as the

7条回答
  •  南方客
    南方客 (楼主)
    2021-01-30 05:38

    If you use a front-end service like Apigee as the front-end to your APIs, you will need something like X-FORWARDED-HOST to understand what hostname was used to connect to the API, because Apigee gets configured with whatever your backend DNS is, nginx and your app stack only see the Host header as your backend DNS name, not the hostname that was called in the first place.

提交回复
热议问题