wss not working
Hi, after deploying it to my server (heroku) , it doesn't work because it requires a secure connection wss. someone managed to solved it?
I haven't looked much into using wss with this. If you find a solution please feel free to add a PR. Thanks!
@NatanGuardicore if you haven't already, take a look at #37 that will probably get you going in the right direction.
I'm definitely still hung up on this, I can't seem to get the advice in #37 to work. The advice is good and best practice (passing https server as constructor to ws server) but it's missing a few pieces and logistics that I can't quite seem to glue together. Any help is appreciated. The first reply on #37 is the approach I took but it's missing pieces like where to "listen" because as it is, that server closes immediately.
Can we use webservers to offload SSL/TLS termination? NGINX or Apache can easily handle SSL/TLS terminations for wss. Isn't that a good idea?
I found the solution that using nginx proxy transport ws to wss, the url would be like ws://localhost/websocket
Config of Nginx
///
location /websocket {
proxy_pass http://localhost:9999;
proxy_set_header X-Real-IP $remote_addr;
proxy_set_header Host $host;
proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;
proxy_http_version 1.1;
proxy_set_header Upgrade $http_upgrade;
proxy_set_header Connection "upgrade";
}
///
hope it helps.