Skip to content

Commit

Permalink
Fix #2755 -- open 127.0.0.1 instead of 0.0.0.0 in serve -b
Browse files Browse the repository at this point in the history
Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed May 11, 2017
1 parent 0acf929 commit 754c1bb
Show file tree
Hide file tree
Showing 2 changed files with 5 additions and 0 deletions.
3 changes: 3 additions & 0 deletions CHANGES.txt
Expand Up @@ -28,6 +28,9 @@ Features
Bugfixes
--------

* Open ``127.0.0.1`` when using ``nikola serve -b`` and default
``0.0.0.0`` hostname to avoid resolution issues — the site is still
available on all interfaces (Issue #2755)
* No longer creates empty subarchive pages, and no longer create broken
archive navigation links on day level (Issue #2734)
* Fixes post scanner plugin order (Issue #2720)
Expand Down
2 changes: 2 additions & 0 deletions nikola/plugins/command/serve.py
Expand Up @@ -146,6 +146,8 @@ def _execute(self, options, args):
if options['browser']:
if ipv6:
server_url = "http://[{0}]:{1}/".format(*sa)
elif sa[0] == '0.0.0.0':
server_url = "http://127.0.0.1:{1}/".format(*sa)
else:
server_url = "http://{0}:{1}/".format(*sa)
self.logger.info("Opening {0} in the default web browser...".format(server_url))
Expand Down

0 comments on commit 754c1bb

Please sign in to comment.