Skip to content

Commit

Permalink
Remove custom page config
Browse files Browse the repository at this point in the history
  • Loading branch information
AnastasiaSliusar committed Aug 6, 2024
1 parent 084b5ba commit 0c49734
Showing 1 changed file with 3 additions and 10 deletions.
13 changes: 3 additions & 10 deletions jupyter_server/serverapp.py
Original file line number Diff line number Diff line change
Expand Up @@ -401,8 +401,6 @@ def init_settings(
# collapse $HOME to ~
root_dir = "~" + root_dir[len(home) :]

self.allow_custom_env_variables = jupyter_app.allow_custom_env_variables

settings = {
# basics
"log_function": log_request,
Expand Down Expand Up @@ -461,8 +459,7 @@ def init_settings(
"allow_password_change": jupyter_app.allow_password_change,
"server_root_dir": root_dir,
"jinja2_env": env,
"serverapp": jupyter_app,
"page_config_hook": (self.page_config_hook),
"serverapp": jupyter_app
}

# allow custom overrides for the tornado web app.
Expand All @@ -473,10 +470,6 @@ def init_settings(
settings["xsrf_cookie_kwargs"] = {"path": base_url}
return settings

def page_config_hook(self, handler, page_config):
page_config["allow_custom_env_variables"] = self.allow_custom_env_variables
return page_config

def init_handlers(self, default_services, settings):
"""Load the (URL pattern, handler) tuples for each component."""
# Order matters. The first handler to match the URL will handle the request.
Expand Down Expand Up @@ -1434,10 +1427,10 @@ def _default_allow_remote(self) -> bool:
""",
)

allow_custom_env_variables = Bool(
allow_setup_custom_env_variables = Bool(
False,
config=True,
help="""Allow to use custom env variables""",
help="""Allow a user to setup custom env variables while launching or selecting a kernel""",
)

browser = Unicode(
Expand Down

0 comments on commit 0c49734

Please sign in to comment.