thalmiclabs / myo.js

Myo javascript bindings
Apache License 2.0
198 stars 63 forks source link

Failed on HTTPS sites. #1

Open stolksdorf opened 9 years ago

stolksdorf commented 9 years ago

From @PhillippOhlandt on February 26, 2015 21:39

Hey I want to build myo control on my websites wich use https.

The websocket cannot be initiated.

Uncaught SecurityError: Failed to construct 'WebSocket': An insecure WebSocket connection may not be initiated from a page loaded over HTTPS.

Copied from original issue: stolksdorf/myo.js#23

stolksdorf commented 9 years ago

Hmm, there doesn't seem to be any easy solution. It might require a change to the way Myo Connect does it's web socket. I'll look into it.

stolksdorf commented 9 years ago

From @PhillippOhlandt on February 27, 2015 20:29

Yes it would be cool if the PC and Mac programm can be updated to support wss://

jeffbryner commented 9 years ago

The diagnostics site fails as well (as an example) when accessed over https https://diagnostics.myo.com/

stolksdorf commented 9 years ago

@jeffbryner thanks for the headsup. Any https site using Myo.js will run into this problem unfortunately. It's pretty low priority to update Myo Connect with wss, but I'll see what I can do.

jeffbryner commented 9 years ago

Understood. I'll see if I can work around it by setting up a nginx ssl proxy somewhere (local or remote) in the system.

jeffbryner commented 9 years ago

FWIW, I figured out how to configure nginx as a local reverse proxy which allows the connection to succeed. Here's some docs: http://mozdef.readthedocs.org/en/latest/advanced_settings.html#myo-with-tls-ssl