Skip to content
Permalink
Browse files

Fix #2755 -- open 127.0.0.1 instead of 0.0.0.0 in serve -b

Signed-off-by: Chris Warrick <kwpolska@gmail.com>
  • Loading branch information
Kwpolska committed May 11, 2017
1 parent 0acf929 commit 754c1bb5afb2217a7f14c3dfeece5bbae700849b
Showing with 5 additions and 0 deletions.
  1. +3 −0 CHANGES.txt
  2. +2 −0 nikola/plugins/command/serve.py
@@ -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)
@@ -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))

0 comments on commit 754c1bb

Please sign in to comment.