From bb51eb68cd6235d9c5dc12a3f26f51b9ea3c54e2 Mon Sep 17 00:00:00 2001 From: Olivier DOSSMANN Date: Mon, 2 Oct 2017 11:57:17 +0200 Subject: [PATCH] =?UTF-8?q?Mode=20production:=20autorisation=20de=20toutes?= =?UTF-8?q?=20les=20requ=C3=AAtes=20CORS?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- collection/collection/environments/production.py | 5 ++++- 1 file changed, 4 insertions(+), 1 deletion(-) diff --git a/collection/collection/environments/production.py b/collection/collection/environments/production.py index bf7c1a3..97fa3db 100644 --- a/collection/collection/environments/production.py +++ b/collection/collection/environments/production.py @@ -15,5 +15,8 @@ ALLOWED_HOSTS = [os.getenv('ALLOWED_HOSTS', '*')] # `proxy_set_header X-Forwarded-For $proxy_add_x_forwarded_for;` USE_X_FORWARDED_HOST = True -# CORS: as we only need to acces API, a regular expression is enough +# CORS: allow all site to make cross site requests +CORS_ORIGIN_ALLOW_ALL = True + +# CORS: limit to API only CORS_URLS_REGEX = r'^/api/.*$'