我在网页中使用Socket.io
,但它不起作用。在console.log
我收到以下错误:
socket.io.js:2 WebSocket connection to 'ws://www.somewebpage.com/socket.io/?EIO=3&transport=websocket&sid=uoSGxATXKabezBn8AABP' failed: Error during WebSocket handshake: Unexpected response code: 400
我有这个Nginx配置:
location / {
proxy_pass http://melo;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
proxy_set_header Host $host;
}
我可以检查什么来解决这个问题?