This feature request is related to Browsersync for HTTPS, so see full details there.
Essentially, Browsersync hangs when used with HTTPS in Local, e.g.
npx browser-sync start --proxy https://playground.local
will never resolve due to its use of https (http works fine). Editing the /private/etc/hosts file to eliminate the ::1
entry:
## Local - Start ##
# ::1 playground.local #Local Site (works if commented out)
127.0.0.1 playground.local #Local Site
::1 www.playground.local #Local Site
127.0.0.1 www.playground.local #Local Site
## Local - End ##
resolves the issue, but any time you start, restart, or add a new site to Local, all comments get reset, and you have to reimplement them in /private/etc/hosts manually again to use Browsersync with HTTPS.
Solutions
- If it doesn’t cause other issues to not add the
::1
entry to begin with, that would solve the issue. - If it’s possible to have the hosts file update routine preserve manually-commented-out URLs rather than rewriting everything from scratch each time, that could be helpful (though it’s still a hassle to get in there and add it once per site).
I’m not a virtual server expert (just a simple front-end developer ), so there may be other options as well.