internal: fix cache-control header

Signed-off-by: Jens Langhammer <jens@goauthentik.io>

#4525
This commit is contained in:
Jens Langhammer 2023-01-25 21:15:22 +01:00
parent 1b6f920265
commit 5ea9595c9c
No known key found for this signature in database

View file

@ -61,7 +61,7 @@ func (ws *WebServer) configureStatic() {
func (ws *WebServer) staticHeaderMiddleware(h http.Handler) http.Handler { func (ws *WebServer) staticHeaderMiddleware(h http.Handler) http.Handler {
etagHandler := etag.Handler(h, false) etagHandler := etag.Handler(h, false)
return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) {
w.Header().Set("Cache-Control", "\"public, no-transform\"") w.Header().Set("Cache-Control", "public, no-transform")
w.Header().Set("X-authentik-version", constants.VERSION) w.Header().Set("X-authentik-version", constants.VERSION)
w.Header().Set("Vary", "X-authentik-version, Etag") w.Header().Set("Vary", "X-authentik-version, Etag")
etagHandler.ServeHTTP(w, r) etagHandler.ServeHTTP(w, r)