https://blog.csdn.net/weixin_44692055/article/details/103693859
vue nginx反向代理设置
location /api/ {
#保留代理之前的host
#proxy_set_header Host $host;
#保留代理之前的真实客户端ip
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
#在多级代理的情况下,记录每次代理之前的客户端真实ip
proxy_set_header HTTP_X_FORWARDED_FOR $remote_addr;
proxy_pass http://tx.dwk.nciwzd.cn/;
}