Open kamilml opened 7 years ago
you can see here my socket work in http protocol but when this try to upgrade to ws protocol, this fail
Well, you are trying to attach event to express app, not server. You can use https://github.com/chimurai/http-proxy-middleware, or find the approach there
I got this error:
WebSocket connection to 'ws://mydomain.com/socket.io/?EIO=3&transport=websocket&sid=EhP73S4_-XoHOIisAAAa' failed: Error during WebSocket handshake: Unexpected response code: 520
I am actually using Next.js with an express.js server. And use http-proxy to proxy a conection to my socket.io server.
http conection works but the
upgrade
don'tthis is my server configuration: