From 69f1b3168ac3f29fc4bafba0418769248b10062a Mon Sep 17 00:00:00 2001 From: Andrew Godwin Date: Thu, 15 Dec 2022 00:35:04 -0700 Subject: Improve cacheability --- takahe/settings.py | 6 +++++- 1 file changed, 5 insertions(+), 1 deletion(-) (limited to 'takahe') diff --git a/takahe/settings.py b/takahe/settings.py index 4e09a10..91bfe7b 100644 --- a/takahe/settings.py +++ b/takahe/settings.py @@ -190,7 +190,7 @@ MIDDLEWARE = [ "django.contrib.messages.middleware.MessageMiddleware", "django.middleware.clickjacking.XFrameOptionsMiddleware", "django_htmx.middleware.HtmxMiddleware", - "core.middleware.AcceptMiddleware", + "core.middleware.HeadersMiddleware", "core.middleware.ConfigLoadingMiddleware", "api.middleware.ApiTokenMiddleware", "users.middleware.IdentityMiddleware", @@ -274,6 +274,10 @@ STATICFILES_FINDERS = [ STATICFILES_DIRS = [BASE_DIR / "static"] +STATICFILES_STORAGE = "django.contrib.staticfiles.storage.ManifestStaticFilesStorage" + +WHITENOISE_MAX_AGE = 3600 + STATIC_ROOT = BASE_DIR / "static-collected" ALLOWED_HOSTS = SETUP.ALLOWED_HOSTS -- cgit v1.2.3