Skip to content

Commit 9e63362

Browse files
committed
use JUPYTERHUB_DOMAIN
1 parent 970161c commit 9e63362

File tree

1 file changed

+4
-4
lines changed

1 file changed

+4
-4
lines changed

jupyter_nestdesktop_proxy/__init__.py

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -95,13 +95,13 @@ def _get_random_alphanumeric_string(length):
9595
raise FileNotFoundError("Passwd generation in temp file FAILED")
9696

9797
# generate nest-server url
98-
jhub_apiurl = os.environ.get('JUPYTERHUB_API_URL')
98+
jhub_domain = os.environ.get('JUPYTERHUB_DOMAIN')
9999
jlab_urlprefix = os.environ.get('JUPYTERHUB_SERVICE_PREFIX')
100-
if jhub_apiurl and jlab_urlprefix:
101-
parsed_url = urlparse(jhub_apiurl)
100+
if jhub_domain and jlab_urlprefix:
102101
_nestsrv_url = (
103-
f"{parsed_url.scheme}://{parsed_url.netloc}" +
102+
"https://" +
104103
sub(r'/+', '/', '/'.join([
104+
jhub_domain,
105105
jlab_urlprefix,
106106
'proxy',
107107
str(nestsrv_port)

0 commit comments

Comments
 (0)