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 based on location protocol #31

Merged
merged 2 commits into from
May 2, 2020

Conversation

daliborgogic
Copy link
Contributor

No description provided.

This changes fixes`Failed to construct 'WebSocket': An insecure WebSocket connection may not be initiated from a page loaded over HTTPS.` when server is listen on 443 port.
feat: ws protocol based on location protocol
@daliborgogic daliborgogic changed the title Websocket connection based on location connection Websocket connection based on location protocol May 2, 2020
@yyx990803
Copy link
Member

vite currently doesn't serve over https yet... but I guess this is needed when we do.

@yyx990803 yyx990803 merged commit 9af9ec1 into vitejs:master May 2, 2020
@daliborgogic
Copy link
Contributor Author

daliborgogic commented May 2, 2020

@yyx990803 we know that vite by default serve over HTTP. Under our local dev setup (docker, nginx, ssl etc) we wish to be close to production as much we can, we have this problem with ws and with this pull request we progressively-enhanced websocket connection protocol.

@rowanu
Copy link

rowanu commented Jun 23, 2020

Sorry for the necro-bump, but looks like this feature is no longer present in mainline?

I'm getting issues in a dev setup (mismatched protocols between http and wss), and I can't see socketProtocol in the code I'm pulling down.

Was that intentional? Would you accept it being re-added?

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 this pull request may close these issues.

3 participants