From e216fc1ed7a8b9658d915072b1730a2e430bdea9 Mon Sep 17 00:00:00 2001 From: Dimitris Koutsonikolis Date: Wed, 23 Jun 2021 20:04:58 +0300 Subject: [PATCH] fix(cors): allowed localhost and client servers --- config/settings/production.py | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/config/settings/production.py b/config/settings/production.py index 9997512..1e441ca 100644 --- a/config/settings/production.py +++ b/config/settings/production.py @@ -174,3 +174,7 @@ }, 'USE_SESSION_AUTH': False, } + +# django-cors-headers - https://github.com/adamchainz/django-cors-headers#setup +CORS_ALLOWED_ORIGIN_REGEXES = [ + r"^https:\/\/tmh-registry-client.*heroku.*app\.com$", r"^http:\/\/localhost.*$"]