nginx配置常用 ( 反向代理时传客户端IP )
反向代理时传客户端IP
location / { proxy_set_header X-Forwarded-For $remote_addr; proxy_set_header X-Forwarded-Host $server_name; proxy_set_header X-Real-IP $remote_addr; proxy_pass http://localhost:8000; }
参考:https://www.cnblogs.com/morgan363/p/12973800.html