View button links to 0.0.0.0
See original GitHub issueDescription:
I am binding Jekyll to 0.0.0.0 using the -H 0.0.0.0
parameter to jekyll serve
in order to make it possible to access Jekyll both on the loopback interface and other configured interfaces (so I could access Jekyll on the local LAN). While Jekyll-Admin seems to work well, the View button attached to every page does links to http://0.0.0.0:4000/my-page
instead of /my-page
.
Tell us a bit about yourself:
- Version of JekyllAdmin I’m using: 0.8.0
- Version of Jekyll I’m using: 3.7.3
- Operating System: Centos on the server, Fedora on client
- Browser: Mozilla Firefox
Steps to reproduce:
jekyll new test
cd test
jekyll serve --watch --incremental --livereload -H 0.0.0.0
- Open web browser FROM ANOTHER COMPUTER on the computer public IP, edit a page, then click on the View button.
I expected the following:
Browser should open http://[public ip]:4000/my-page, page content should be displayed.
But got the following, instead:
Browser opens http://0.0.0.0:4000/my-page, which is inaccessible.
Issue Analytics
- State:
- Created 5 years ago
- Reactions:2
- Comments:13
Top Results From Across the Web
How to communicate with a device that has an assigned “0.0 ...
Normally you'll see systems and applications bind ports to 0.0.0.0 which means the port is accessible from any interface.
Read more >What IP java use when provide 0.0.0.0 as localAddress in ...
I don't believe 0.0.0.0 is a valid local address for a connected socket, but if it is INADDR_ANY , which means 'use any...
Read more >Why would one of my devices address be 0.0.0.0?
It literally means "This Network" so it represents the entire network. Your device is trying to connect to the network, and can see...
Read more >No virtual IP address for Hamachi just 0.0.0.0.
On the top to the right of the power button it has no IP address just 0.0.0.0. Any ideas on how to fix...
Read more >How to allow Login to any IP address? - Salesforce Developers
Go to Adinistration Setup >> Profile >> selecte the desired profiles >> Go to Login IP ranges related list >> click on new...
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 FreeTop 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
Top GitHub Comments
I would vote to reopen this issue. You are missing reverse proxy and Docker situation.
The case to reproduce is:
http://example.com
where I want a Jekyll site0.0.0.0
and port4000
http://example.com
to the local server instance on0.0.0.0:4000
http://0.0.0.0:4000/...
is opened instead ofhttp://example.com/...
resulting in 404Using Nginx without Docker, the local instance would probably run on
localhost:4000
instead of0.0.0.0:4000
, however it is the same situation.Some browsers (such as Firefox) treats
0.0.0.0
the same as127.0.0.1
, so there is no problem accessing such address. On the other hand, if Jekyll requested to listen toINADDR_ANY
, the user may be interested to access the server from remote machine, so redirecting to127.0.0.1
is pointless.What I would suggest is a simple replace code to replace
0.0.0.0
(or127.0.0.1
) with the content of the HTTP requestHost
header – If the browser could access the server using that address, that’s an address the browser could use for the following requests. Another option could be to replace the absolute URLs with relative URLs.