fix some redirect.

login redict to home if already loged in
/hub redirect to /hub/
This commit is contained in:
Matthias Bussonnier
2014-09-21 19:55:53 +02:00
parent 7b2fd29657
commit d56e8b9186
2 changed files with 4 additions and 0 deletions

View File

@@ -288,8 +288,10 @@ class JupyterHubApp(Application):
self.handlers = self.add_url_prefix(self.hub_prefix, h)
# some extra handlers, outside hub_prefix
self.handlers.extend([
(r"%s" % self.hub_prefix.rstrip('/'), web.RedirectHandler, {"url": self.hub_prefix}),
(r"(?!%s).*" % self.hub_prefix, handlers.PrefixRedirectHandler),
(r'(.*)', handlers.Template404),
])