From 494276163dabe9ac7cac49a2c8d00ac9728d6478 Mon Sep 17 00:00:00 2001 From: Samuel Young Date: Mon, 30 Dec 2024 17:37:39 +0000 Subject: [PATCH] PC-1294: trim trailing slash from env URL --- help_to_heat/settings.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/help_to_heat/settings.py b/help_to_heat/settings.py index c4f060ac..cb794be7 100644 --- a/help_to_heat/settings.py +++ b/help_to_heat/settings.py @@ -258,7 +258,8 @@ def show_toolbar(request): TOTP_ISSUER = "Help to Heat Supplier Portal" -CSRF_TRUSTED_ORIGINS = [BASE_URL] +# origins don't have a trailing slash, the BASE_URL does so must be trimmed +CSRF_TRUSTED_ORIGINS = [BASE_URL.rstrip("/")] if not DEBUG: SESSION_COOKIE_SECURE = True