diff --git a/banmarchive/settings/base.py b/banmarchive/settings/base.py index c0613d4..36a71ab 100644 --- a/banmarchive/settings/base.py +++ b/banmarchive/settings/base.py @@ -62,14 +62,15 @@ ] MIDDLEWARE = [ + 'django.middleware.security.SecurityMiddleware', + 'whitenoise.middleware.WhiteNoiseMiddleware', 'django.contrib.sessions.middleware.SessionMiddleware', 'django.middleware.common.CommonMiddleware', 'django.middleware.csrf.CsrfViewMiddleware', 'django.contrib.auth.middleware.AuthenticationMiddleware', 'django.contrib.messages.middleware.MessageMiddleware', 'django.middleware.clickjacking.XFrameOptionsMiddleware', - 'django.middleware.security.SecurityMiddleware', - + 'wagtail.contrib.redirects.middleware.RedirectMiddleware', 'banmarchive.middleware.canonical_host_redirect', ] diff --git a/banmarchive/settings/production.py b/banmarchive/settings/production.py index 0eed8f6..a6e22b3 100644 --- a/banmarchive/settings/production.py +++ b/banmarchive/settings/production.py @@ -2,6 +2,8 @@ from .base import * from urllib.parse import urlparse +STATICFILES_STORAGE = "whitenoise.storage.CompressedManifestStaticFilesStorage" + DEBUG = False SECRET_KEY = os.getenv('SECRET_KEY') BASE_URL = re.sub(r'/$', '', os.getenv('BASE_URL', ''))