mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-18 15:33:02 +00:00
Ensure that SERVICE_FIX has trailing slash.
Fixes Issue #997. Also updated Traitlets to 4.3.2 since the change in singleuser.py relies on trait default values being checked through validator, which was added in traitlets 4.3.2.
This commit is contained in:
@@ -204,7 +204,7 @@ class Service(LoggingConfigurable):
|
||||
|
||||
@property
|
||||
def prefix(self):
|
||||
return url_path_join(self.base_url, 'services', self.name)
|
||||
return url_path_join(self.base_url, 'services', self.name + '/')
|
||||
|
||||
@property
|
||||
def proxy_path(self):
|
||||
|
@@ -180,6 +180,17 @@ class SingleUserNotebookApp(NotebookApp):
|
||||
def _base_url_default(self):
|
||||
return os.environ.get('JUPYTERHUB_SERVICE_PREFIX') or '/'
|
||||
|
||||
#Note: this may be removed if notebook module is >= 5.0.0b1
|
||||
@validate('base_url')
|
||||
def _validate_base_url(self, proposal):
|
||||
"""ensure base_url starts and ends with /"""
|
||||
value = proposal.value
|
||||
if not value.startswith('/'):
|
||||
value = '/' + value
|
||||
if not value.endswith('/'):
|
||||
value = value + '/'
|
||||
return value
|
||||
|
||||
@default('cookie_name')
|
||||
def _cookie_name_default(self):
|
||||
if os.environ.get('JUPYTERHUB_SERVICE_NAME'):
|
||||
|
@@ -1,5 +1,5 @@
|
||||
alembic
|
||||
traitlets>=4.3
|
||||
traitlets>=4.3.2
|
||||
tornado>=4.1
|
||||
jinja2
|
||||
pamela
|
||||
|
Reference in New Issue
Block a user