diff options
-rw-r--r-- | conf/settings/base.py | 4 | ||||
-rw-r--r-- | nginx-conf/nginx.conf | 5 | ||||
-rw-r--r-- | requirements.txt | 1 |
3 files changed, 4 insertions, 6 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", diff --git a/nginx-conf/nginx.conf b/nginx-conf/nginx.conf index ff22800..c899096 100644 --- a/nginx-conf/nginx.conf +++ b/nginx-conf/nginx.conf @@ -18,10 +18,5 @@ http { proxy_set_header Host $host; proxy_set_header X-Real-IP $remote_addr; } - - location /static/ { - alias /usr/share/nginx/html/static; - } - } } diff --git a/requirements.txt b/requirements.txt index 1152c83..601c07a 100644 --- a/requirements.txt +++ b/requirements.txt @@ -6,3 +6,4 @@ django-htmx==1.17.3 gunicorn==22.0.0 psycopg2==2.9.9 tzdata==2024.1 +whitenoise==6.6.0 |