我的博客

Nginx向后方服务器传递客户端真实信息

Nginx向后方服务器传递客户端真实信息

Nginx向后方服务器传递客户端真实信息

proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Real-Port $remote_port;
proxy_set_header X-Forwarded-For $remote-addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header Host $host;
proxy_set_header Connection "upgrade";
proxy_set_header Upgrade $http_upgrade;

proxy_redirect off;
posted @ 2021-04-10 19:20  姜道义  阅读(157)  评论(0编辑  收藏  举报