Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

wss not working #48

Open
NatanGuardicore opened this issue Feb 4, 2020 · 5 comments
Open

wss not working #48

NatanGuardicore opened this issue Feb 4, 2020 · 5 comments

Comments

@NatanGuardicore
Copy link

Hi,
after deploying it to my server (heroku) , it doesn't work because it requires a secure connection wss.
someone managed to solved it?

@kyriesent
Copy link
Owner

I haven't looked much into using wss with this. If you find a solution please feel free to add a PR. Thanks!

@kyriesent
Copy link
Owner

@NatanGuardicore if you haven't already, take a look at #37 that will probably get you going in the right direction.

@mmeyers-solartech
Copy link

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.

@Kavyeshs41
Copy link

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?

@jzzxh
Copy link

jzzxh commented Nov 10, 2022

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.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants