-
-
Notifications
You must be signed in to change notification settings - Fork 4.2k
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
how do i use browsersync with a reverse proxy #629
Comments
I should probably add that BrowserSync appears to be intercepting button events. When i navigate the site using http://localhost:3000 the buttons work properly. When i switch to https://localhost the buttons do not work. Just an observation.. |
Modifying the proxy target address to "https://localhost" in tools/server.js works. When the browser comes up it displays the url of the BrowserSync proxy server which hooks browser actions and propagates them to other devices registered with BrowserSync. The proxy server forwards the http traffic to the reverse proxy. This isn't entirely transparent because if you try to switch the URL away from the BrowserSync proxy it seems that the events are still hooked so buttons don't work. If you need CORs then problems occur because of the domain switching. You need to configure the BrowserSync proxy server i.e. https://hondo.wtf/posts/enable-cors-in-browsersync/ . I didn't actually do this so the BrowserSync forums might be best if you run into difficulty. |
I'm using a reverse proxy (haProxy in this case). The proxy is also an SSL terminator.
frontend : https://localhost
backend : http://localhost:8080
I've tried setting the BrowserSync proxy target option to the frontend address, but it insists on bringing up the browser with https://localhost:3000. I'm missing something. Can anyone help?
The text was updated successfully, but these errors were encountered: