diff options
author | Matthew Lemon <y@yulqen.org> | 2024-06-06 18:25:12 +0100 |
---|---|---|
committer | Matthew Lemon <y@yulqen.org> | 2024-06-06 18:25:12 +0100 |
commit | c5c5a3ac0fef11f5c5cf91a15c33fa3841873e6c (patch) | |
tree | 5572889ea833b01d3cee1217057056e57b85f70f /conf | |
parent | ebb34ca32be4007bb17ad32ae68c5f43b228371d (diff) |
Move to whitenoise for static files.
Accompanying files in manifests adapted too so we don't use persistent
volume claims.
Diffstat (limited to 'conf')
-rw-r--r-- | conf/settings/base.py | 4 |
1 files changed, 3 insertions, 1 deletions
diff --git a/conf/settings/base.py b/conf/settings/base.py index a16c488..0d7078a 100644 --- a/conf/settings/base.py +++ b/conf/settings/base.py @@ -9,6 +9,7 @@ https://docs.djangoproject.com/en/4.0/topics/settings/ For the full list of settings and their values, see https://docs.djangoproject.com/en/4.0/ref/settings/ """ + from pathlib import Path # Build paths inside the project like this: BASE_DIR / 'subdir'. @@ -20,7 +21,7 @@ BASE_DIR = Path(__file__).resolve().parent.parent CSRF_COOKIE_SECURE = True SESSION_COOKIE_SECURE = True CSRF_TRUSTED_ORIGINS = [ - 'https://*.apps.ocp1.azure.dso.digital.mod.uk', + "https://*.apps.ocp1.azure.dso.digital.mod.uk", ] # Quick-start development settings - unsuitable for production @@ -64,6 +65,7 @@ INTERNAL_IPS = ["127.0.0.1", "localhost"] MIDDLEWARE = [ "django.middleware.security.SecurityMiddleware", + "whitenoise.middleware.WhiteNoiseMiddleware", # "debug_toolbar.middleware.DebugToolbarMiddleware", "django.contrib.sessions.middleware.SessionMiddleware", "django.middleware.common.CommonMiddleware", |