From 531eb2f209e8347e503e89630e56fc337287bde0 Mon Sep 17 00:00:00 2001 From: Nino Date: Tue, 11 Mar 2025 13:39:05 +0100 Subject: [PATCH 1/2] add cors --- app/settings/settings.py | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/app/settings/settings.py b/app/settings/settings.py index d62a9863..0e2575d5 100755 --- a/app/settings/settings.py +++ b/app/settings/settings.py @@ -19,6 +19,7 @@ LOCAL_DEVELOPMENT_AUTHENTICATION = ( os.getenv("LOCAL_DEVELOPMENT_AUTHENTICATION", False) == "True" ) + LOCAL_DEVELOPMENT_USE_MULTIPROCESSING = ( os.getenv("LOCAL_DEVELOPMENT_USE_MULTIPROCESSING", False) == "True" ) @@ -204,7 +205,7 @@ ALLOWED_HOSTS = ["*"] CORS_ORIGIN_WHITELIST = os.environ.get("CORS_ORIGIN_WHITELIST").split(",") -CORS_ORIGIN_ALLOW_ALL = True +CORS_ORIGIN_ALLOW_ALL = False SPECTACULAR_SETTINGS = { "SCHEMA_PATH_PREFIX": "/api/v[0-9]/", From 43439e403b3ccbb1577e3fb6a4edcac266d3768c Mon Sep 17 00:00:00 2001 From: Nino Date: Wed, 12 Mar 2025 09:20:03 +0100 Subject: [PATCH 2/2] rename settings --- app/settings/settings.py | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/settings/settings.py b/app/settings/settings.py index 0e2575d5..4d47e1f8 100755 --- a/app/settings/settings.py +++ b/app/settings/settings.py @@ -204,7 +204,7 @@ # CORS and allowed hosts ALLOWED_HOSTS = ["*"] -CORS_ORIGIN_WHITELIST = os.environ.get("CORS_ORIGIN_WHITELIST").split(",") +CORS_ALLOWED_ORIGINS = os.environ.get("CORS_ORIGIN_WHITELIST").split(",") CORS_ORIGIN_ALLOW_ALL = False SPECTACULAR_SETTINGS = {