From d8759bacb6175d5f9b20bc3b9e373f3ee49f62e5 Mon Sep 17 00:00:00 2001 From: Paul D'Ambra Date: Mon, 2 Dec 2024 10:03:08 +0100 Subject: [PATCH] revert: "fix: static files served with different vary headers" (#26536) --- posthog/settings/web.py | 13 ------------- 1 file changed, 13 deletions(-) diff --git a/posthog/settings/web.py b/posthog/settings/web.py index 2116157f3f9b3..2c38f14937198 100644 --- a/posthog/settings/web.py +++ b/posthog/settings/web.py @@ -251,19 +251,6 @@ ] STATICFILES_STORAGE = "whitenoise.storage.ManifestStaticFilesStorage" - -def add_vary_headers(headers, _path, _url): - """ - we might serve static content on multiple domains, so we need to vary on Origin - as well as accept-encoding to avoid caching issues - see: https://github.com/evansd/whitenoise/blob/b3d250fd17da0e280d58b6dc4935c4573ebe8b55/docs/django.rst?plain=1#L392-L422 - which says: The function should not return anything; changes should be made by modifying the headers dictionary directly. - """ - headers["Vary"] = "Origin, Accept-Encoding" - - -WHITENOISE_STATIC_HEADERS = add_vary_headers - AUTH_USER_MODEL = "posthog.User" LOGIN_URL = "/login"