More trial and error
This commit is contained in:
parent
19c3d41dd9
commit
d7664c3c44
|
@ -173,15 +173,14 @@ hub:
|
||||||
class RefreshHandler(HubAuthenticated, RequestHandler):
|
class RefreshHandler(HubAuthenticated, RequestHandler):
|
||||||
@authenticated
|
@authenticated
|
||||||
def get(self):
|
def get(self):
|
||||||
|
print(os.environ)
|
||||||
user_model = self.get_current_user()
|
user_model = self.get_current_user()
|
||||||
user_model = os.environ
|
|
||||||
self.set_header('content-type', 'application/json')
|
self.set_header('content-type', 'application/json')
|
||||||
self.write(json.dumps(user_model, indent=1, sort_keys=True))
|
self.write(json.dumps(user_model, indent=1, sort_keys=True))
|
||||||
|
|
||||||
|
|
||||||
def main():
|
def main():
|
||||||
print(os.environ)
|
prefix = '/services/refresh-token/'
|
||||||
prefix = os.environ.get('JUPYTERHUB_SERVICE_PREFIX', '/')
|
|
||||||
app = Application(
|
app = Application(
|
||||||
[
|
[
|
||||||
(prefix, RefreshHandler),
|
(prefix, RefreshHandler),
|
||||||
|
@ -190,6 +189,7 @@ hub:
|
||||||
)
|
)
|
||||||
|
|
||||||
http_server = HTTPServer(app)
|
http_server = HTTPServer(app)
|
||||||
|
print(os.environ)
|
||||||
url = urlparse(os.environ['JUPYTERHUB_SERVICE_URL'])
|
url = urlparse(os.environ['JUPYTERHUB_SERVICE_URL'])
|
||||||
|
|
||||||
http_server.listen(url.port, url.hostname)
|
http_server.listen(url.port, url.hostname)
|
||||||
|
|
Loading…
Reference in a new issue