From 7971f09978e8ceb9d061ccf46872d5087005de86 Mon Sep 17 00:00:00 2001 From: Amit Kumar Date: Mon, 28 Aug 2023 13:50:55 +0530 Subject: [PATCH] fix plotly DASH_REQUESTS_PATHNAME_PREFIX env --- jhub_apps/spawner/spawner.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/jhub_apps/spawner/spawner.py b/jhub_apps/spawner/spawner.py index 22f2a534..4e8f2376 100644 --- a/jhub_apps/spawner/spawner.py +++ b/jhub_apps/spawner/spawner.py @@ -27,10 +27,10 @@ def get_env(self): if self.user_options.get("jhub_app"): framework = self.user_options.get("framework") - framework_env = COMMANDS.get(framework).get("env", {}) - print(f"framework_env: {framework_env}") - # env.update(framework_env) - print(f"Updated environment: {env}") + if framework == "plotlydash": + jh_service_prefix = env.get("JUPYTERHUB_SERVICE_PREFIX") + env["DASH_REQUESTS_PATHNAME_PREFIX"] = jh_service_prefix + print(f"Updated environment: {type(env)} {env}") return env async def start(self):