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

wss protocol problem #5

Open
nabillefi opened this issue Mar 6, 2023 · 1 comment
Open

wss protocol problem #5

nabillefi opened this issue Mar 6, 2023 · 1 comment

Comments

@nabillefi
Copy link

Initially, I used a ws address to integrate a project with my Vue application, which worked correctly. However, when I deployed the frontend code to the cloud, the WebSocket was blocked by the browser because it required the protocol to be wss. To overcome this issue, I added ingress to convert the protocol from http to https. Since then, I have been able to successfully receive messages through the WebSocket. Do you have any suggestions for a potential solution?

@salsferrazza
Copy link
Contributor

This appears to be expected behavior because I don't believe one can mix modes between secure and insecure. Meaning, if the initial handshake request is done over http(s), then the socket connection itself must also be over http(s).

In the first case (presuming you were running locally), both were running over HTTP. The cloud deployment of the web front-end likely enforces HTTPS, which trickles down into what is expected from the websocket connection.

Is there a particular reason (other than overhead) to refrain from running sockets over HTTPS?

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

No branches or pull requests

2 participants