mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-18 23:42:59 +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
|
@property
|
||||||
def prefix(self):
|
def prefix(self):
|
||||||
return url_path_join(self.base_url, 'services', self.name)
|
return url_path_join(self.base_url, 'services', self.name + '/')
|
||||||
|
|
||||||
@property
|
@property
|
||||||
def proxy_path(self):
|
def proxy_path(self):
|
||||||
|
@@ -180,6 +180,17 @@ class SingleUserNotebookApp(NotebookApp):
|
|||||||
def _base_url_default(self):
|
def _base_url_default(self):
|
||||||
return os.environ.get('JUPYTERHUB_SERVICE_PREFIX') or '/'
|
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')
|
@default('cookie_name')
|
||||||
def _cookie_name_default(self):
|
def _cookie_name_default(self):
|
||||||
if os.environ.get('JUPYTERHUB_SERVICE_NAME'):
|
if os.environ.get('JUPYTERHUB_SERVICE_NAME'):
|
||||||
|
@@ -1,5 +1,5 @@
|
|||||||
alembic
|
alembic
|
||||||
traitlets>=4.3
|
traitlets>=4.3.2
|
||||||
tornado>=4.1
|
tornado>=4.1
|
||||||
jinja2
|
jinja2
|
||||||
pamela
|
pamela
|
||||||
|
Reference in New Issue
Block a user