Skip to content

Commit

Permalink
Merge pull request #2756 from getnikola/fix-2755
Browse files Browse the repository at this point in the history
Fix #2755 -- open 127.0.0.1 instead of 0.0.0.0 in serve -b
  • Loading branch information
ralsina committed May 12, 2017
2 parents 0ae8666 + 84ad63c commit 3d77845
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 @@ -30,6 +30,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)
* Don't break animated GIFs in postprocessing (Issue #2750)
* More robust shortcodes, no need to escape URLs in reSt, work better
with LaTeX, etc.
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 3d77845

Please sign in to comment.