From 277d5046269bf2f719bfd370548ef8cf6caa3720 Mon Sep 17 00:00:00 2001 From: Paul D'Ambra Date: Mon, 4 Nov 2024 20:09:30 +0100 Subject: [PATCH] fix: recorder js cache in django (#25964) --- posthog/settings/web.py | 8 -------- 1 file changed, 8 deletions(-) diff --git a/posthog/settings/web.py b/posthog/settings/web.py index 2b5649b89b9..e9d537d609e 100644 --- a/posthog/settings/web.py +++ b/posthog/settings/web.py @@ -297,14 +297,6 @@ SPECTACULAR_SETTINGS = { EXCEPTIONS_HOG = {"EXCEPTION_REPORTING": "posthog.exceptions.exception_reporting"} - -def add_recorder_js_headers(headers, path, url): - if url.endswith("/recorder.js") and not DEBUG: - headers["Cache-Control"] = "max-age=31536000, public" - - -WHITENOISE_ADD_HEADERS_FUNCTION = add_recorder_js_headers - # Cookie age in seconds (default 2 weeks) - these are the standard defaults for Django but having it here to be explicit SESSION_COOKIE_AGE = get_from_env("SESSION_COOKIE_AGE", 60 * 60 * 24 * 14, type_cast=int)