set login cookie when redirecting

should avoid one possible redirect-loop case when the single-user cookie is invalid, but the Hub cookie is valid.
This commit is contained in:
Min RK
2016-04-06 10:18:23 -07:00
parent a13119a79f
commit e8a298be00

View File

@@ -27,6 +27,7 @@ class RootHandler(BaseHandler):
if user.running: if user.running:
url = user.url url = user.url
self.log.debug("User is running: %s", url) self.log.debug("User is running: %s", url)
self.set_login_cookie(user) # set cookie
else: else:
url = url_path_join(self.hub.server.base_url, 'home') url = url_path_join(self.hub.server.base_url, 'home')
self.log.debug("User is not running: %s", url) self.log.debug("User is not running: %s", url)