From 0e5329e0e84eab0a19fa7ea57ef802194fffa85d Mon Sep 17 00:00:00 2001 From: Lauri Gates Date: Mon, 23 Oct 2023 15:45:48 +0300 Subject: [PATCH] Add CSRF_TRUSTED_ORIGINS to settings.py --- mittaridatapumppu-deviceregistry/deviceregistry/settings.py | 2 ++ 1 file changed, 2 insertions(+) diff --git a/mittaridatapumppu-deviceregistry/deviceregistry/settings.py b/mittaridatapumppu-deviceregistry/deviceregistry/settings.py index 87c7adc..4a3594c 100644 --- a/mittaridatapumppu-deviceregistry/deviceregistry/settings.py +++ b/mittaridatapumppu-deviceregistry/deviceregistry/settings.py @@ -21,6 +21,7 @@ # Platta uses mSECRET_KEY as the name for the variable. mSECRET_KEY=(str, ""), ALLOWED_HOSTS=(list, ["deviceregistry", "localhost", "127.0.0.1", "[::1]"]), + CSRF_TRUSTED_ORIGINS=(list, ["https://deviceregistry"]), DJANGO_DB_NAME=(str, "postgres"), DJANGO_DB_USER=(str, "postgres"), DJANGO_DB_PASSWORD=(str, "postgres"), @@ -42,6 +43,7 @@ DEBUG = env("DEBUG") ALLOWED_HOSTS = env("ALLOWED_HOSTS") +CSRF_TRUSTED_ORIGINS = env("CSRF_TRUSTED_ORIGINS") # Application definition