nginx 设置 wss 反向代理

location /wss {
proxy_pass http://127.0.0.1:10086;
proxy_http_version 1.1;
proxy_set_header Upgrade http_upgrade; proxy_set_header Connection "Upgrade"; proxy_set_header X-real-ipremote_addr;
proxy_set_header X-Forwarded-For $remote_addr;
}

推荐阅读更多精彩内容