More trial and error

This commit is contained in:
Micke Nordin 2024-01-16 14:15:45 +01:00
parent 19c3d41dd9
commit d7664c3c44
Signed by untrusted user: Micke
GPG key ID: F53C4CC83EDAB3BE

View file

@ -173,15 +173,14 @@ hub:
class RefreshHandler(HubAuthenticated, RequestHandler):
@authenticated
def get(self):
print(os.environ)
user_model = self.get_current_user()
user_model = os.environ
self.set_header('content-type', 'application/json')
self.write(json.dumps(user_model, indent=1, sort_keys=True))
def main():
print(os.environ)
prefix = os.environ.get('JUPYTERHUB_SERVICE_PREFIX', '/')
prefix = '/services/refresh-token/'
app = Application(
[
(prefix, RefreshHandler),
@ -190,6 +189,7 @@ hub:
)
http_server = HTTPServer(app)
print(os.environ)
url = urlparse(os.environ['JUPYTERHUB_SERVICE_URL'])
http_server.listen(url.port, url.hostname)