Skip to content
Snippets Groups Projects
Commit f5fd56e0 authored by Bastien Abadie's avatar Bastien Abadie
Browse files

Merge branch 'rename-cors-settings' into 'master'

Rename Django CORS headers settings

Closes #477

See merge request !1003
parents 0554ce7b e7c6976c
No related branches found
Tags base-django-3.1.2
1 merge request!1003Rename Django CORS headers settings
......@@ -416,7 +416,7 @@ if conf['cache']['type'] in (CacheType.Redis, CacheType.Memcached):
else:
SESSION_ENGINE = 'django.contrib.sessions.backends.db'
CORS_ORIGIN_WHITELIST = conf['cors']['origin_whitelist']
CORS_ALLOWED_ORIGINS = conf['cors']['origin_whitelist']
CORS_ALLOW_CREDENTIALS = True
CORS_ALLOW_HEADERS = default_headers + (
'cache-control', # Allow the frontend to prevent caching some API requests
......@@ -425,7 +425,7 @@ CORS_URLS_REGEX = r'^/(api|ponos)/.*$'
# Support CORS suffixes
if conf['cors']['suffixes']:
CORS_ORIGIN_REGEX_WHITELIST = [
CORS_ALLOWED_ORIGIN_REGEXES = [
r"^https://.+{}".format(suffix)
for suffix in conf['cors']['suffixes']
]
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment