-
Notifications
You must be signed in to change notification settings - Fork 756
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
Proxying Websocket connections fails with "Connection closed before receiving a handshake response" #625
Comments
@alp82 I'm also having websocket related issues with browser sync along these lines and have had to not use browsersync proxying for now. |
I confirm this issue. browser-sync 2.7.13 |
I have the same problem with my Ruby on Rails app, running at
If I go directly to my app directly at |
This is being actively worked on as we speak and a fix will be released as soon as possible. |
Ok, so I have this all fixed now - I need to test in more envs, but I'm pretty sure it's good to go. For anyone interested - the problem was relating to the fact that Browsersync in proxy mode tries to use a single server/port to serve the client script, run the web sockets + proxy requests through to your server. Well it turns out that of course socket.io is handling the The solution is to simple boot a separate server to handle Browsersync's websocket connections when in proxy mode and pass through all of your own websockets via the proxy (as you'd expect). |
Your effort is very much appreciated. Thanks! |
This fixes issues for me. Great job! Thank you! |
Bit late to the party here, but could I grab an example of the proxy through browsersync by any chance? |
So what's the correct way to proxy websockets through browsersync? |
The fix only fixes |
I use BrowserSync configured with the proxy setting to redirect all requests to my local webserver.
When opening the page, i get the following error message in Chrome (Version 42, Arch Linux):
Due to this issue in the foxy project, there was indeed no working support for proxying websocket connections: shakyShane/foxy#2
But they pushed a fix in release 10.1.2 which is included as dependency in the current BrowserSync release 2.7.1. I tried using that version, but it did not change anything and i still get the same error.
Do you need more information? Can anyone confirm this issue?
The text was updated successfully, but these errors were encountered: