From 9dd7f047ffad33938fd6ff760d06b5230eaf5a63 Mon Sep 17 00:00:00 2001 From: Nathan Chapman Date: Sun, 22 Jan 2023 00:50:29 -0700 Subject: [PATCH] Add CSRF trusted origins to env with default --- ptcoffee/settings.py | 7 ++++--- 1 file changed, 4 insertions(+), 3 deletions(-) diff --git a/ptcoffee/settings.py b/ptcoffee/settings.py index 049b48f..1c1c3f2 100644 --- a/ptcoffee/settings.py +++ b/ptcoffee/settings.py @@ -174,9 +174,10 @@ SECURE_SSL_REDIRECT = env.bool('SECURE_SSL_REDIRECT', False) CSRF_COOKIE_SECURE = env.bool('CSRF_COOKIE_SECURE', False) SECURE_CROSS_ORIGIN_OPENER_POLICY = 'same-origin-allow-popups' FILE_UPLOAD_MAX_MEMORY_SIZE = 60000000 -CSRF_TRUSTED_ORIGINS = [ - 'https://ptcoffee-dev.windmillapps.org' -] +CSRF_TRUSTED_ORIGINS = env.list( + 'CSRF_TRUSTED_ORIGINS', + ['https://ptcoffee-dev.windmillapps.org'] +) # Password validation