报错:
wss连接是不能以ip加端口的方式来连接的
解决办法是 利用nginx的反向代理功能
nginx配置文件中,加入如下配置:
#websocket
location /wss {
proxy_pass http://localhost:****/websocket;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "Upgrade";
}
重启ng,生效