Skip to content

Commit

Permalink
Add allow_setup_custom_env_variables flag to page config
Browse files Browse the repository at this point in the history
  • Loading branch information
AnastasiaSliusar committed Aug 6, 2024
1 parent bca8978 commit 086bb7a
Showing 1 changed file with 3 additions and 0 deletions.
3 changes: 3 additions & 0 deletions jupyterlab_server/handlers.py
Original file line number Diff line number Diff line change
Expand Up @@ -82,10 +82,13 @@ def get_page_config(self) -> dict[str, Any]:
server_root = self.settings.get("server_root_dir", "")
server_root = server_root.replace(os.sep, "/")
base_url = self.settings.get("base_url")
server_app = self.settings.get("serverapp")
allow_setup_custom_env_variables = server_app.allow_custom_env_variables

# Remove the trailing slash for compatibility with html-webpack-plugin.
full_static_url = self.static_url_prefix.rstrip("/")
page_config.setdefault("fullStaticUrl", full_static_url)
page_config.setdefault("allow_setup_custom_env_variables", allow_setup_custom_env_variables)

page_config.setdefault("terminalsAvailable", terminals)
page_config.setdefault("ignorePlugins", [])
Expand Down

0 comments on commit 086bb7a

Please sign in to comment.