实践Forwarded HTTP Extension

Forwarded HTTP Extension

ForwardedForwarded: by=<identifier>;for=<identifier>;host=<host>;proto=<http|https>

X-Forwarded-Host:客户端的原始请求目标主机,比如api.***.com

X-Forwarded-For:客户端请求到达服务器经过的IP列表,逐级追加为谁代理转发。比如:X-Forwarded-For: <client>, <proxy1>, <proxy2>,代表client,经过了proxy1和proxy2和proxy3的代理转发,到达服务端,proxy3没有出现是因为没人为他转发了。

X-Forwarded-Proto

X-Forwarded-Port:

参考

Nginx 302