@@ -132,14 +132,13 @@ def _load_max_cache_uris(self):
132
132
_static_url_prefix = Unicode ()
133
133
@default ('_static_url_prefix' )
134
134
def _load_static_url_prefix (self ):
135
- # Last '/' ensures that NBViewer still works regardless of whether user chooses e.g. '/static2/' pr '/static2' as their custom prefix
136
- return url_path_join (self .base_url , self .static_url_prefix , '/' )
135
+ # Last '/' ensures that NBViewer still works regardless of whether user chooses e.g. '/static2/' or '/static2' as their custom prefix
136
+ return url_path_join (self ._base_url , self .static_url_prefix , '/' )
137
137
138
+ # prefer the JupyterHub defined service prefix over the CLI
138
139
@cached_property
139
- def base_url (self ):
140
- # prefer the JupyterHub defined service prefix over the CLI
141
- base_url = os .getenv ("JUPYTERHUB_SERVICE_PREFIX" , options .base_url )
142
- return base_url
140
+ def _base_url (self ):
141
+ return os .getenv ("JUPYTERHUB_SERVICE_PREFIX" , options .base_url )
143
142
144
143
@cached_property
145
144
def cache (self ):
@@ -273,7 +272,7 @@ def init_tornado_application(self):
273
272
user_gists_handler = self .user_gists_handler ,
274
273
)
275
274
handler_kwargs = {'handler_names' : handler_names , 'handler_settings' : self .handler_settings }
276
- handlers = init_handlers (self .formats , options .providers , self .base_url , options .localfiles , ** handler_kwargs )
275
+ handlers = init_handlers (self .formats , options .providers , self ._base_url , options .localfiles , ** handler_kwargs )
277
276
278
277
# NBConvert config
279
278
self .config .NbconvertApp .fileext = 'html'
@@ -288,7 +287,7 @@ def init_tornado_application(self):
288
287
settings = dict (
289
288
# Allow FileFindHandler to load static directories from e.g. a Docker container
290
289
allow_remote_access = True ,
291
- base_url = self .base_url ,
290
+ base_url = self ._base_url ,
292
291
binder_base_url = options .binder_base_url ,
293
292
cache = self .cache ,
294
293
cache_expiry_max = options .cache_expiry_max ,
0 commit comments