mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-18 07:23:00 +00:00
Server name is second element
This commit is contained in:
@@ -1202,7 +1202,7 @@ class UserUrlHandler(BaseHandler):
|
|||||||
and self.current_user
|
and self.current_user
|
||||||
and user_name == self.current_user.name
|
and user_name == self.current_user.name
|
||||||
):
|
):
|
||||||
server_name = user_path.split('/', 1)[0]
|
server_name = user_path.split('/', 2)[1]
|
||||||
if server_name not in self.current_user.orm_user.orm_spawners:
|
if server_name not in self.current_user.orm_user.orm_spawners:
|
||||||
# no such server, assume default
|
# no such server, assume default
|
||||||
server_name = ''
|
server_name = ''
|
||||||
@@ -1293,7 +1293,7 @@ class UserUrlHandler(BaseHandler):
|
|||||||
if self.allow_named_servers:
|
if self.allow_named_servers:
|
||||||
# check if url prefix matches an existing server name
|
# check if url prefix matches an existing server name
|
||||||
self.log.debug("user_path " + user_path)
|
self.log.debug("user_path " + user_path)
|
||||||
server_name = user_path.split("/", 1)[0]
|
server_name = user_path.split("/", 2)[1]
|
||||||
self.log.debug("server_name " + server_name)
|
self.log.debug("server_name " + server_name)
|
||||||
if server_name not in user.orm_user.orm_spawners:
|
if server_name not in user.orm_user.orm_spawners:
|
||||||
# not found, assume default server
|
# not found, assume default server
|
||||||
|
Reference in New Issue
Block a user