0
0
mirror of https://github.com/PostHog/posthog.git synced 2024-11-27 16:26:50 +01:00

fix: recorder js cache in django (#25964)

This commit is contained in:
Paul D'Ambra 2024-11-04 20:09:30 +01:00 committed by GitHub
parent 69d2f2d82b
commit 277d504626
No known key found for this signature in database
GPG Key ID: B5690EEEBB952194

View File

@ -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)