BrowserSync / browser-sync

Keep multiple browsers & devices in sync when building websites. https://browsersync.io
https://discord.gg/2d2xUThp
Apache License 2.0
12.17k stars 754 forks source link

Erronous urls on localtunnel instance #1827

Open markusritschel opened 3 years ago

markusritschel commented 3 years ago

Hi,

When using the local instance of my site via https://localhost:3000 BrowserSync (I am using v2.26.13 on linux) works just fine. However, using the tunnel option, it doesn't display any styles of the website. Also my javascript and everything is not working. By looking in the source code of the tunneled site I found that all the urls to my javascript & css files look like https,//myurl.loca.lt/path/to/my.css. Yes, there is a comma after https. If I manually change the comma to a semicolon via the web-developer inspector tool of my browser, the styles are displayed. So, all the files are actually served via BrowserSync but the url is somewhat deformed. Is anyone experiencing the same problem or knows a solution for it? In any way, thanks in advance!

Cheers, Markus

markusritschel commented 3 years ago

I just had the idea of also looking in my https://localhost:3000 source code. And I found that all my links that are broken in the tunnel instance (see above) correspond to links of the format //localhost:3000 without the https in front. Similar to #1696. Is this something I can fix with a setting in BrowserSync?

markusritschel commented 3 years ago

The same is actually true for all kinds of internal links, i.e. also images etc. are not displayed due to the same reason.