mahi-man
mahi-man

Reputation: 4676

Rails Heroku Cloudflare SSL and websockets

I have set up my Rails app on Heroku and used the information in the post: Heroku + Cloudflare completely free SSL to get SSL working for free, but my websockets connection does not work. I get the error WebSocket connection to 'wss://www.myapp.com/websocket' failed: Error during WebSocket handshake: Unexpected response code: 200. I understand that this is due to Cloudflare not supporting websockets in their free plans and they suggest setting up a subdomain that does not pass through Cloudflare. The problem of course is that the subdomain cannot then use the 'free' SSL setup.

Is there anyway I can get this to work, or do I have to shell out for either SSL support on Heroku or Websocket support on Cloudflare?

Upvotes: 2

Views: 340

Answers (1)

Amit Teli
Amit Teli

Reputation: 935

I know this is an old thread.

But now cloudflare supports websocket for free plan as well. It just restricts the ports which can be used.

I recently encountered this situation and could implement the websockets through cloudflare. Can refer my approach here

May help someone.

Upvotes: 0

Related Questions