hanzhihua / techsite

0 stars 0 forks source link

Nginx多次转发问题 - 一个码农 工作点滴 #15

Open hanzhihua opened 5 years ago

hanzhihua commented 5 years ago

https://hanzhihua.cn/post/proxy_1/

今天遇到一个nginx转发丢失客户端ip问题,原来的配置是这样的 proxy_set_header X-Real-IP $remote_addr; proxy_set_header X-Forwarded-For $remote_addr; 每一层nginx配置都是这样的,应用取得的客户端是上一层ngin