From 67c4d8d31477fa8a56655a7a1dd843da125a1e90 Mon Sep 17 00:00:00 2001 From: dameyerdave Date: Thu, 7 Dec 2023 16:39:44 +0100 Subject: [PATCH] [CHA] adjust settings to be used as a separate container in another project --- api/app/ena_upload_ms/settings.py | 8 ++++---- 1 file changed, 4 insertions(+), 4 deletions(-) diff --git a/api/app/ena_upload_ms/settings.py b/api/app/ena_upload_ms/settings.py index 93f54de..1176225 100644 --- a/api/app/ena_upload_ms/settings.py +++ b/api/app/ena_upload_ms/settings.py @@ -178,11 +178,11 @@ ### # SECURITY ### -ALLOWED_HOSTS = environ.get("DJANGO_ALLOWED_HOSTS").split(",") +ALLOWED_HOSTS = environ.get("DJANGO_ALLOWED_HOSTS", "*").split(",") # CORS configuration -CORS_ALLOW_ALL_ORIGINS = False -CORS_ALLOWED_ORIGINS = environ.get("DJANGO_CORS_ALLOWED_ORIGINS").split(",") +CORS_ALLOW_ALL_ORIGINS = True +CORS_ALLOWED_ORIGINS = environ.get("DJANGO_CORS_ALLOWED_ORIGINS", "").split(",") CORS_ALLOW_HEADERS = default_headers + ( "cache-control", "pragma", @@ -192,7 +192,7 @@ CORS_ALLOW_CREDENTIALS = True # CSRF configuration -CSRF_TRUSTED_ORIGINS = environ.get("DJANGO_CSRF_TRUSTED_ORIGINS").split(",") +CSRF_TRUSTED_ORIGINS = environ.get("DJANGO_CSRF_TRUSTED_ORIGINS", "").split(",") CSRF_USE_SESSIONS = False CSRF_COOKIE_HTTPONLY = False CSRF_COOKIE_SAMESITE = "Strict"