wss://localhost/wssSocket转发到ws://127.0.0.1:8090/websocket/statistic

1
2
3
4
5
6
7
8
9
10
11
location /wssSocket {
proxy_pass http://127.0.0.1:8090/websocket/statistic;
proxy_http_version 1.1;
proxy_redirect off;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_set_header X-Forwarded-Host $server_name;
}