Try another means of setting url

This commit is contained in:
Micke Nordin 2024-01-16 10:07:48 +01:00
parent 7e9643f9b6
commit f42114dff2
Signed by untrusted user: Micke
GPG key ID: F53C4CC83EDAB3BE

View file

@ -41,13 +41,13 @@ hub:
def main(): def main():
app = Application( app = Application(
[ [
('/services/?', RefreshHandler), ('/services/refresh-token', RefreshHandler),
(r'.*', RefreshHandler), (r'.*', RefreshHandler),
] ]
) )
http_server = HTTPServer(app) http_server = HTTPServer(app)
url = urlparse(os.environ['JUPYTERHUB_SERVICE_URL']) url = urlparse(f'http://{os.environ["PROXY_API_SERVICE_HOST"]}:{os.environ["PROXY_API_SERVICE_PORT"]}')
http_server.listen(url.port, url.hostname) http_server.listen(url.port, url.hostname)