mirror of
https://github.com/jupyterhub/jupyterhub.git
synced 2025-10-07 10:04:07 +00:00
Merge pull request #3927 from meeseeksmachine/auto-backport-of-pr-3918-on-2.x
Backport PR #3918 on branch 2.x (set default_url via config)
This commit is contained in:
@@ -633,6 +633,12 @@ class SingleUserNotebookAppMixin(Configurable):
|
||||
# disable trash by default
|
||||
# this can be re-enabled by config
|
||||
self.config.FileContentsManager.delete_to_trash = False
|
||||
# load default-url env at higher priority than `@default`,
|
||||
# which may have their own _defaults_ which should not override explicit default_url config
|
||||
# via e.g. c.Spawner.default_url. Seen in jupyterlab's SingleUserLabApp.
|
||||
default_url = os.environ.get("JUPYTERHUB_DEFAULT_URL")
|
||||
if default_url:
|
||||
self.config[self.__class__.__name__].default_url = default_url
|
||||
self._log_app_versions()
|
||||
return super().initialize(argv)
|
||||
|
||||
|
Reference in New Issue
Block a user