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

Merge branch 'no-cache-workflow' into 'master'

Allow the frontend to remove caching on some API requests

See merge request !254
parents 337ac5e4 9604a279
No related branches found
No related tags found
1 merge request!254Allow the frontend to remove caching on some API requests
......@@ -13,6 +13,7 @@ https://docs.djangoproject.com/en/1.11/ref/settings/
import os
import sys
import logging
from corsheaders.defaults import default_headers
def env2list(env_name, separator=',', default=[]):
......@@ -392,6 +393,9 @@ CORS_ORIGIN_WHITELIST = env2list('CORS_ORIGIN_WHITELIST', default=[
'127.0.0.1:5000',
])
CORS_ALLOW_CREDENTIALS = True
CORS_ALLOW_HEADERS = default_headers + (
'cache-control', # Allow the frontend to prevent caching some API requests
)
CORS_URLS_REGEX = r'^/(api|ponos)/.*$'
# Docker images used by our ponos workflow
......
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