Skip to content

Commit

Permalink
revert: "fix: static files served with different vary headers" (#26536)
Browse files Browse the repository at this point in the history
  • Loading branch information
pauldambra authored and zlwaterfield committed Dec 2, 2024
1 parent 943f0e5 commit d8759ba
Showing 1 changed file with 0 additions and 13 deletions.
13 changes: 0 additions & 13 deletions posthog/settings/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -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"
Expand Down

0 comments on commit d8759ba

Please sign in to comment.