From 841c73edec3faaab6d09131eb759c78eb59d6f22 Mon Sep 17 00:00:00 2001 From: Muhammad Rehan <97768909+rehan892@users.noreply.github.com> Date: Mon, 8 Jul 2024 18:51:24 +0500 Subject: [PATCH] feat: Add credentials allow settings for CORS (#272) --- .../backend/config/settings/base.py | 5 ----- .../backend/config/settings/local.py | 1 + 2 files changed, 1 insertion(+), 5 deletions(-) diff --git a/{{cookiecutter.project_slug}}/backend/config/settings/base.py b/{{cookiecutter.project_slug}}/backend/config/settings/base.py index 59245f42..b16217fa 100644 --- a/{{cookiecutter.project_slug}}/backend/config/settings/base.py +++ b/{{cookiecutter.project_slug}}/backend/config/settings/base.py @@ -350,11 +350,6 @@ "MUTATIONS_DEFAULT_HANDLE_ERRORS": True, } {%- endif %} -{%- if cookiecutter.use_graphql == "y" or cookiecutter.use_drf == "y" %} -# ------------------------------------------------------------------------------ -# CORS settings -CORS_ALLOW_ALL_ORIGINS = True -{%- endif %} # Your stuff... # ------------------------------------------------------------------------------ diff --git a/{{cookiecutter.project_slug}}/backend/config/settings/local.py b/{{cookiecutter.project_slug}}/backend/config/settings/local.py index e7fbce6a..723e6233 100644 --- a/{{cookiecutter.project_slug}}/backend/config/settings/local.py +++ b/{{cookiecutter.project_slug}}/backend/config/settings/local.py @@ -67,6 +67,7 @@ # ------------------------------------------------------------------------------ # CORS settings CORS_ALLOW_ALL_ORIGINS = True +CORS_ALLOW_CREDENTIALS = True {%- endif %} # Your stuff... # ------------------------------------------------------------------------------