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

Browsersync + Traefik #1731

Closed
mehdi-ghezal opened this issue Dec 4, 2019 · 2 comments
Closed

Browsersync + Traefik #1731

mehdi-ghezal opened this issue Dec 4, 2019 · 2 comments

Comments

@mehdi-ghezal
Copy link

Issue details

I have a docker container with Nginx. It serve a folder src with a simple index.html file.
This container is not directly accessible to the host, it's behind another container with Traefik that act as a reverse proxy.

I can access my index.html via Traefik that relay the request to Nginx with the following address : http://browsersync-nginx.localhost

I setup a Gulp task that launch Browsersync that proxy to http://browsersync-nginx.localhost and in this setup the browser keep loading and loading until it timeout.

Steps to reproduce/test case

I setup a repository with every components required for reproduce the issue : https://github.com/mehdi-ghezal/browsersync-traefik.

The Readme explain how to install every component.

Please specify which version of Browsersync, node and npm you're running

  • Browsersync [ 2.26.7 ]
  • Node [ 12.13.1 ]
  • Npm [ 6.12.1 ]

Affected platforms

OS X confirmed, other not tested.

Browsersync use-case

Gulp

@mehdi-ghezal
Copy link
Author

Similar issue #1506

@mehdi-ghezal
Copy link
Author

Hello,

I finally figured out what is the issue.

When I access the address http://browsersync-nginx.localhost, Chrome take over my DNS configuration and resolve it to 127.0.0.1. So when I proxy it via Browsersync, it resolve with my DNS configuration and guess what.... I forget to declare it in my /etc/hosts 🤣

So after fix my /etc/hosts everything fine.

I didn't know for the .localhost top domain and Chrome. BTW, it's seem that Chrome just follow the best practice : https://tools.ietf.org/html/rfc2606

Hope this report can help other people in the same situation.

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

1 participant