From ca51acff751248330ee789d32ff35c46290983d7 Mon Sep 17 00:00:00 2001 From: Raman Chaudhary <97114586+ChaudharyRaman@users.noreply.github.com> Date: Fri, 26 Jan 2024 16:19:15 +0530 Subject: [PATCH] Fix: Added Frontend Origin in CORS whitelist (#114) * fix:cors * added frontend origin * added deploy-previews to cors whitelist --------- Co-authored-by: Armin Patel <72291325+arminpatel@users.noreply.github.com> --- backend/core/settings/base.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/backend/core/settings/base.py b/backend/core/settings/base.py index d7aa3f9..9584d58 100644 --- a/backend/core/settings/base.py +++ b/backend/core/settings/base.py @@ -22,7 +22,10 @@ # ALLOWED_HOSTS = os.environ.get('DJANGO_ALLOWED_HOSTS').split(' ') CORS_ORIGIN_ALLOW_ALL = False -CORS_ORIGIN_WHITELIST = ['http://localhost:3000', ] +CORS_ORIGIN_WHITELIST = ['http://localhost:3000', + 'https://merch-site.netlify.app', + 'https://deploy-preview-*--merch-site.netlify.app' + ] # Application definition