From 41175299e2cd5023839d4d34ff891f143b8cd332 Mon Sep 17 00:00:00 2001 From: DJ Gillespie Date: Wed, 19 Jul 2023 22:22:43 -0600 Subject: [PATCH 1/3] updated cors rules to allow for chrome webapps --- core/settings/__init__.py | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/core/settings/__init__.py b/core/settings/__init__.py index 5f79e3f..ab7991d 100644 --- a/core/settings/__init__.py +++ b/core/settings/__init__.py @@ -76,8 +76,7 @@ MIDDLEWARE = [ ] CORS_ORIGIN_WHITELIST = [ - 'http://localhost:3000', - 'https://localhost:3000' + '*' ] ROOT_URLCONF = 'core.urls' From b059ec8538e85601cc0bf2ea8b36ed68dd1809ab Mon Sep 17 00:00:00 2001 From: DJ Gillespie Date: Wed, 19 Jul 2023 22:26:09 -0600 Subject: [PATCH 2/3] attempt 2 at cors --- core/settings/__init__.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/core/settings/__init__.py b/core/settings/__init__.py index ab7991d..0680661 100644 --- a/core/settings/__init__.py +++ b/core/settings/__init__.py @@ -76,8 +76,11 @@ MIDDLEWARE = [ ] CORS_ORIGIN_WHITELIST = [ - '*' + 'http://localhost:3000', + 'https://localhost:3000', + 'http://localhost:44485' ] +CORS_ALLOW_ALL_ORIGINS = True ROOT_URLCONF = 'core.urls' From 92091018af9f312cc6df256f3f06cf4805bfad16 Mon Sep 17 00:00:00 2001 From: DJ Gillespie Date: Wed, 19 Jul 2023 22:34:26 -0600 Subject: [PATCH 3/3] cors attempt 3 --- core/settings/__init__.py | 9 +++------ core/settings/production.py | 2 ++ 2 files changed, 5 insertions(+), 6 deletions(-) diff --git a/core/settings/__init__.py b/core/settings/__init__.py index 0680661..476cfc4 100644 --- a/core/settings/__init__.py +++ b/core/settings/__init__.py @@ -75,12 +75,9 @@ MIDDLEWARE = [ 'whitenoise.middleware.WhiteNoiseMiddleware', ] -CORS_ORIGIN_WHITELIST = [ - 'http://localhost:3000', - 'https://localhost:3000', - 'http://localhost:44485' -] -CORS_ALLOW_ALL_ORIGINS = True +ALLOWED_HOSTS = ['*'] +CORS_ORIGIN_ALLOW_ALL = True +CORS_ALLOW_HEADERS = ['*'] ROOT_URLCONF = 'core.urls' diff --git a/core/settings/production.py b/core/settings/production.py index 7b21658..a957369 100644 --- a/core/settings/production.py +++ b/core/settings/production.py @@ -17,6 +17,8 @@ SECRET_KEY = os.environ.get("SECRET_KEY") DEBUG = True ALLOWED_HOSTS = ['*'] +CORS_ORIGIN_ALLOW_ALL = True +CORS_ALLOW_HEADERS = ['*'] plaid_envs = {'sandbox': plaid.Environment.Sandbox, 'development': plaid.Environment.Development,