tristandunn / pusher-fake

A fake Pusher server for development and testing.
https://rubygems.org/gems/pusher-fake
MIT License
173 stars 32 forks source link

Newer versons of pusher-js client force TLS by default #63

Closed barrettkingram closed 4 years ago

barrettkingram commented 4 years ago

I'm setting up pusher-fake using the newest pusher client JS library (currently 7.0). After following the setup approach described in the documentation, I found that I wasn't able to connect to the pusher-fake server because the browser was trying to connect with TLS. After much debugging I found a workaround:

var pusher = <%= raw(PusherFake.javascript(forceTLS: false)) %>;

As of v6.0.0 (2020-04-27), pusher-js sets forceTLS to true by default which we need to override.

It seems like it may be a good idea to add the forceTLS: false setting to the config in PusherFake::Configuration#to_options. I think others will encounter this issue as more begin using later versions of pusher-js.

tristandunn commented 4 years ago

Fixed in https://github.com/tristandunn/pusher-fake/commit/3cb306f79f97900661efcb97b15f5dcf73354e3e. I'll release a new version soon.

Thanks for letting me know.

tristandunn commented 4 years ago

Released v2.1.0.

barrettkingram commented 4 years ago

Cool, thanks!