Skip to content
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

websocket connection fails over SSL. #25

Closed
mitcheaton1 opened this issue Mar 2, 2017 · 2 comments
Closed

websocket connection fails over SSL. #25

mitcheaton1 opened this issue Mar 2, 2017 · 2 comments

Comments

@mitcheaton1
Copy link

mitcheaton1 commented Mar 2, 2017

Locally this works without issue. When hosted using SSL, I have Phoenix forcing SSL, and it seems to break the websocket connection.

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

I'm using Phoenix channels, and my application doesn't have any socket issues on other parts. Maybe I'm doing something wrong?

@MaxPower15
Copy link

I also had this issue and ended up modifying the ws:// in the compiled assets.ex to wss://, and that fixed it for me. I'll try to get a PR up soon to fix this based on the page's protocol.

@MaxPower15
Copy link

Related to this, if you visit the page over https, the https://www.chartjs.org/assets/Chart.min.js file will timeout because it hangs over https at that domain. At least, it does for me. We can switch this to use a public CDN that supports https instead.

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

Successfully merging a pull request may close this issue.

2 participants