igm/sockjs-go

TLS/SSL for sockjs

Closed this issue · 2 comments

Has anyone tried to implement TLS/SSL for this project? I found this stack overflow question for nodejs: http://stackoverflow.com/questions/10523947/setting-up-ssl-with-sockjs

It also seems to improve connectivity, especially on iOS (where iOS 9 is now forcing default connections to be HTTPS): https://gist.github.com/konklone/4247942

Hello @paulhovey. We use sockjs-go with TLS enabled. We keep our services behind Nginx with SSL enabled in it. Also there is no problem to run secure HTTP server using just Go - just call http.ListenAndServeTLS with certificate files.

Hi @FZambia -

I tested yesterday with some self-signed certificates and using ListenAndServeTLS and it seemed to work as expected. Looking through the gorilla websocket code, it seems to automatically upgrade the connection to wss if there is a TLS config available. Thanks for the information that someone else is using this with TLS.