mirror of
https://github.com/GNS3/gns3-server.git
synced 2025-06-13 04:48:22 +00:00
If listen on all interface do not return localhost as console
Fix https://github.com/GNS3/gns3-gui/issues/1574
This commit is contained in:
@ -411,8 +411,16 @@ class Compute:
|
||||
def _getUrl(self, path):
|
||||
host = self._host
|
||||
# IPV6
|
||||
if host and ":" in host:
|
||||
host = "[{}]".format(host)
|
||||
if host:
|
||||
# IPV6
|
||||
if ":" in host:
|
||||
# Reduce IPV6 to his simple form
|
||||
host = str(ipaddress.IPv6Address(host))
|
||||
if host == "::":
|
||||
host = "::1"
|
||||
host = "[{}]".format(host)
|
||||
elif host == "0.0.0.0":
|
||||
host = "127.0.0.1"
|
||||
return "{}://{}:{}/v2/compute{}".format(self._protocol, host, self._port, path)
|
||||
|
||||
@asyncio.coroutine
|
||||
|
Reference in New Issue
Block a user