node.js - Websocket connection error -


i using node, express, http-proxy , socket.io-client. have created socket server behind http-proxy server. when call received client http-proxy redirect socket server.

 proxyserver.on("upgrade", function (req, socket, head) {         proxy.ws(req, socket, head, {target: target});  }) 

my ws:// call redirected succesfully on server 'connection' event in server , 'connect' on client sockets closed suddenly.

error shown in crome -

websocket connection 'ws://127.0.0.1/socket.io/?eio=3&transport=websocket' failed: invalid frame header

error shown in firefox -

the connection ws://127.0.0.1/socket.io/?eio=3&transport=websocket interrupted while page loading.

every thing works fine without proxy server.i have not find proper solution fix it. in advance.


Comments

Popular posts from this blog

commonjs - How to write a typescript definition file for a node module that exports a function? -

openid - Okta: Failed to get authorization code through API call -

ios - Change Storyboard View using Seague -