mgr/dashboard: return FQDN for default server_addr

Instead of returning '0.0.0.0' the dashboard returns the FQDN of the
host, as it is the case for '::'.

Fixes: https://tracker.ceph.com/issues/42664

Signed-off-by: Patrick Seidensal <pseidensal@suse.com>
This commit is contained in:
Patrick Seidensal 2019-11-06 11:42:52 +01:00
parent ffcd974222
commit a4e96b45ac

View File

@ -179,7 +179,7 @@ class CherryPyConfig(object):
uri = "{0}://{1}:{2}{3}/".format(
'https' if ssl else 'http',
socket.getfqdn() if server_addr == "::" else server_addr,
socket.getfqdn() if server_addr in ['::', '0.0.0.0'] else server_addr,
server_port,
self.url_prefix
)