mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-11 20:13:02 +00:00
support kubespawner running on a IPv6 only cluster
This commit is contained in:
@@ -566,7 +566,12 @@ class User:
|
||||
else:
|
||||
# >= 0.7 returns (ip, port)
|
||||
proto = 'https' if self.settings['internal_ssl'] else 'http'
|
||||
url = '%s://%s:%i' % ((proto,) + url)
|
||||
|
||||
# check if spawner returned an IPv6 address
|
||||
if ':' in url[0]:
|
||||
url = '%s://[%s]:%i' % ((proto,) + url)
|
||||
else:
|
||||
url = '%s://%s:%i' % ((proto,) + url)
|
||||
urlinfo = urlparse(url)
|
||||
server.proto = urlinfo.scheme
|
||||
server.ip = urlinfo.hostname
|
||||
|
Reference in New Issue
Block a user