From 897ac974230bb0d5e7a0fe9cdfea22443b9952fc Mon Sep 17 00:00:00 2001 From: George Green Date: Wed, 20 Jul 2022 21:17:29 +0200 Subject: [PATCH] fixed csrf --- recipes/settings.py | 3 +++ 1 file changed, 3 insertions(+) diff --git a/recipes/settings.py b/recipes/settings.py index 120a1386a9..7f8e0daa96 100644 --- a/recipes/settings.py +++ b/recipes/settings.py @@ -52,6 +52,9 @@ ALLOWED_HOSTS = os.getenv('ALLOWED_HOSTS').split(',') if os.getenv('ALLOWED_HOSTS') else ['*'] +if os.getenv('CSRF_TRUSTED_ORIGINS'): + CSRF_TRUSTED_ORIGINS = os.getenv('CSRF_TRUSTED_ORIGINS').split(',') + CORS_ORIGIN_ALLOW_ALL = True LOGIN_REDIRECT_URL = "index"