Skip to content

Commit

Permalink
set Vary header correctly for static files
Browse files Browse the repository at this point in the history
  • Loading branch information
frankh committed Jan 23, 2025
1 parent 5f172d6 commit 6f03d23
Showing 1 changed file with 4 additions and 0 deletions.
4 changes: 4 additions & 0 deletions posthog/settings/web.py
Original file line number Diff line number Diff line change
Expand Up @@ -251,6 +251,10 @@
]
STATICFILES_STORAGE = "whitenoise.storage.ManifestStaticFilesStorage"

def static_varies_origin(headers, path, url):
headers["Vary"] = "Accept-Encoding, Origin"
WHITENOISE_ADD_HEADERS_FUNCTION = static_varies_origin

AUTH_USER_MODEL = "posthog.User"

LOGIN_URL = "/login"
Expand Down

0 comments on commit 6f03d23

Please sign in to comment.