Skip to content

Commit

Permalink
only set xsrf if auth is enabled
Browse files Browse the repository at this point in the history
  • Loading branch information
minrk committed May 6, 2024
1 parent 6fa1f1b commit 9165f4a
Showing 1 changed file with 1 addition and 1 deletion.
2 changes: 1 addition & 1 deletion binderhub/base.py
Original file line number Diff line number Diff line change
Expand Up @@ -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(
Expand Down

0 comments on commit 9165f4a

Please sign in to comment.