Running local server on non-localhost causes breakages
See original GitHub issueSteps to reproduce:
gulp --host=<insert name of host machine>
navigate to hostname:8000/examples/ads.amp.html Select doubleclick for ad network. Notice how all the ads 404
The issue is that non-localhost is not being identified as localDev in mode.js, which is instead hardcoding localhost in its check for localdev mode.
Issue Analytics
- State:
- Created 6 years ago
- Comments:23 (23 by maintainers)
Top Results From Across the Web
Localhost Refused to Connect Error: 5 Confirmed Ways to Fix It
Localhost refused to connect error can be caused by an incorrectly configured port, insufficient permissions, or an inoperative web server.
Read more >Layout Looks Good on Localhost, But Breaks on Live Website?
I'm building a new layout in localhost. The layout looks perfectly normal in the local server; no errors, no floating out of parent...
Read more >Fix automatic re-routing of http:// to https:// on localhost in Web ...
This issue isn't going to bite everyone, but it will cause problems if any of your localhost sites use HSTS security. A good...
Read more >Errors displaying a hosted website in IIS on a local server with ...
Hi. On a server 2012R2 with IIS 8.5 running, I have a website that works fine on the internet eg https://www.website.co.za/fax/index.asp.
Read more >Is there an advantage to running code on a localhost as ...
Your application may need to do some heavy processing that is slow in the browser but fast on a server; Recording stats on...
Read more >
Top Related Medium Post
No results found
Top Related StackOverflow Question
No results found
Troubleshoot Live Code
Lightrun enables developers to add logs, metrics and snapshots to live code - no restarts or redeploys required.
Start Free
Top Related Reddit Thread
No results found
Top Related Hackernoon Post
No results found
Top Related Tweet
No results found
Top Related Dev.to Post
No results found
Top Related Hashnode Post
No results found
I believe this is stemming from the hardcoded check for
localhost
here: https://github.com/ampproject/amphtml/blob/master/src/mode.js#L79Turns out we need to write
AMP_CONFIG
to the 3p frame as well, for local development with a non-localhost server. Fix available in #12703.