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
HTTPS and Websockets #296
Comments
Sente is expecting a 1xx (I forget the exact number) status code to switch protocols from HTTP(S) to WS(S). Can you check that you've configured Apache to accept WS connections? |
Oh cool, I did not know that. I suspected as much, that Apache2 would be the culprit! Thanks a lot for the quick feedback, I shall look into it! I'm not sure where that switch lives. |
Well, after some battling with Apache2.4.7 I now have some educated questions: My "/login" is also not working, throwing me a 403 Forbidden. Not sure why that is happening. Is there a particular WebSocket port that sente uses, or is redirecting to the port of my running application through Where can I learn more about how sente does websockets and WSS if it's https? Should I just have it redirect to ws:// ~ and expect that it shall shift itself? Thanks for any help. |
Hello I eventually had to do a lot of fun stuff in my apache configuration (/sites-enabled/mydomain-ssl.conf) One instruction that was absolutely necessary to get websockets to work looks like this
Which I got from this awesome stack overflow answer (the second one) here https://stackoverflow.com/questions/27526281/websockets-and-apache-proxy-how-to-configure-mod-proxy-wstunnel/35141086#35141086 In case somebody else is going nuts with SSL-based websockets over apache2.4.7 or similar |
Thank you for this fix! It rescued our application after a lot of debugging. I wrote about solving our issue here: https://tech.toryanderson.com/2020/10/26/websockets-for-clojure-sente-in-apache-reverse-proxy/ |
Hello,
Is there something special I should know if I want to use Sente with HTTPS?
I am trying now to run my clojurescript project that has a clojure backend on my SSL-enabled Apache box and my websockets are telling me that "200" is an unexpected error code o_O
The text was updated successfully, but these errors were encountered: