From 9a44f597a7570e0a355584abd63e1d3b7f5ea4e7 Mon Sep 17 00:00:00 2001 From: phzhik Date: Mon, 10 Jul 2023 21:24:19 +0400 Subject: [PATCH] + DISABLE_CORS option --- poizonstore/settings.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/poizonstore/settings.py b/poizonstore/settings.py index ae2a537..2fc03ee 100644 --- a/poizonstore/settings.py +++ b/poizonstore/settings.py @@ -28,6 +28,7 @@ CDEK_CLIENT_SECRET = '***REMOVED***' # SECURITY WARNING: don't run with debug turned on in production! DEBUG = True DISABLE_PERMISSIONS = True +DISABLE_CORS = True ALLOWED_HOSTS = ["crm-poizonstore.ru", "127.0.0.1", "localhost", "45.84.227.72"] @@ -44,6 +45,9 @@ CORS_ALLOWED_ORIGINS = [ "https://localhost:8001", ] +if DISABLE_CORS: + CORS_ALLOW_ALL_ORIGINS = True + AUTH_USER_MODEL = 'store.User'