javascript - WebSocket connection on wss failed -
i have purchased certificate , installed in node.js website.but https @ browser shows green , ok.now, trying establish socket connection using wss, failed. error @ javascript client side this.
websocket connection 'wss://securedsitedotcom:3003/call' failed: websocket opening handshake canceled
please help!
code @ client side (javascript)
var ws = new websocket('wss://securedsitedotcom:3003/call');
code @ server side (node.js)
https = require('https'); var server = https.createserver({ key: fs.readfilesync(config.certkeypath), cert: fs.readfilesync(config.certcrt), requestcert: true, rejectunauthorized: false },app); server.listen(port); var wss = new ws.server({ server: server, path: '/call' });
error @ browser console :
websocket connection 'wss://securedsitedotcom:3003/call' failed: websocket opening handshake canceled
recent work chrome has revealed if page served https on chrome, websockets must use wss. , if wss must used, port 443 must used (and boot not other secure port , far have not seen way change port), may problem since port looks 3003 above.
right trying group patch/upgrade apache on server mod_proxy_wstunnel can used make apache listening on 443 reverse proxy , pass wss traffic through websocket server.
hope helps.
Comments
Post a Comment