diff --git a/gns3server/run.py b/gns3server/run.py index 55cc1757..47f5067d 100644 --- a/gns3server/run.py +++ b/gns3server/run.py @@ -116,7 +116,7 @@ def parse_arguments(argv): config = Config.instance().get_section_config("Server") defaults = { - "host": config.get("host", "localhost"), + "host": config.get("host", "0.0.0.0"), "port": config.get("port", 3080), "ssl": config.getboolean("ssl", False), "certfile": config.get("certfile", ""), diff --git a/gns3server/web/route.py b/gns3server/web/route.py index 132e70a7..e656d45b 100644 --- a/gns3server/web/route.py +++ b/gns3server/web/route.py @@ -118,7 +118,7 @@ class Route(object): if not user: log.error("HTTP authentication is enabled but no username is configured") else: - log.error("Invalid authentication for username '{}'".format(user)) + log.error("Invalid HTTP authentication for username '{}'".format(user)) response = Response(request=request, route=route) response.set_status(401) diff --git a/tests/test_run.py b/tests/test_run.py index 356a2e9c..1f706847 100644 --- a/tests/test_run.py +++ b/tests/test_run.py @@ -71,7 +71,7 @@ def test_parse_arguments(capsys, tmpdir): assert "optional arguments" in out assert run.parse_arguments(["--host", "192.168.1.1"]).host == "192.168.1.1" - assert run.parse_arguments([]).host == "localhost" + assert run.parse_arguments([]).host == "0.0.0.0" server_config["host"] = "192.168.1.2" assert run.parse_arguments(["--host", "192.168.1.1"]).host == "192.168.1.1" assert run.parse_arguments([]).host == "192.168.1.2"