Add server cache

This commit is contained in:
2024-02-02 00:04:40 +01:00
parent d435837c80
commit edbc01122d
2 changed files with 29 additions and 19 deletions

View File

@ -12,6 +12,8 @@ https://docs.djangoproject.com/en/5.0/ref/settings/
from pathlib import Path
from corsheaders.defaults import default_headers
# Build paths inside the project like this: BASE_DIR / 'subdir'.
BASE_DIR = Path(__file__).resolve().parent.parent
@ -61,6 +63,12 @@ CORS_ALLOWED_ORIGINS = [
"http://localhost:3000",
]
CORS_ALLOW_HEADERS = (
*default_headers,
"If-Modified-Since",
'Cache-Control',
)
ROOT_URLCONF = "sncf.urls"
TEMPLATES = [