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;
转载请声明https://www.cnblogs.com/wdzn/