Skip to content
Snippets Groups Projects
Commit e7c6976c authored by Erwan Rouchet's avatar Erwan Rouchet Committed by Bastien Abadie
Browse files

Rename Django CORS headers settings

parent 0554ce7b
No related branches found
No related tags found
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