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

Allow the frontend to remove caching on some API requests

parent 337ac5e4
No related branches found
No related tags found
No related merge requests found
......@@ -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