From c5c5a3ac0fef11f5c5cf91a15c33fa3841873e6c Mon Sep 17 00:00:00 2001 From: Matthew Lemon Date: Thu, 6 Jun 2024 18:25:12 +0100 Subject: Move to whitenoise for static files. Accompanying files in manifests adapted too so we don't use persistent volume claims. --- conf/settings/base.py | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) (limited to 'conf/settings/base.py') 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", -- cgit v1.2.3