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:
parent
69d2f2d82b
commit
277d504626
@ -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)
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user