Error during WebSocket handshake: 'Connection' header value must contain 'Upgrade'

派大星不会游泳

index:32 WebSocket connection to 'wss://xxx.fs.com/wss/' failed: Error during WebSocket handshake: 'Connection' header value must contain 'Upgrade'

这个js报错到底是什么问题呀? 我不理解 按照官方文档 配置的代理 都没啥问题 连上去就断开了

location /wss
{
proxy_pass http://127.0.0.1:8282;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
proxy_set_header X-Real-IP $remote_addr;
}

1667 1 0
1个回答

six

估计你的8282不是websocket端口。用ws连下8282端口试下呗,看能不能连上

年代过于久远,无法发表回答
×
🔝