From 9165f4a9533b1edc85f2f04469929782721fe34e Mon Sep 17 00:00:00 2001 From: Min RK Date: Mon, 6 May 2024 14:09:44 +0200 Subject: [PATCH] only set xsrf if auth is enabled --- binderhub/base.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/binderhub/base.py b/binderhub/base.py index cc73bb9b0..5f198c401 100644 --- a/binderhub/base.py +++ b/binderhub/base.py @@ -142,9 +142,9 @@ def template_namespace(self): static_url=self.static_url, banner=self.settings["banner_message"], auth_enabled=self.settings["auth_enabled"], - xsrf=self.xsrf_token.decode("ascii"), ) if self.settings["auth_enabled"]: + ns["xsrf"] = self.xsrf_token.decode("ascii") ns["api_token"] = self.hub_auth.get_token(self) or "" ns.update(