Add Cache-Control for authenticated pages

This commit is contained in:
Jan Dittberner 2022-05-26 17:05:47 +02:00
parent d5d7525a31
commit 257a777e03

View file

@ -88,6 +88,8 @@ func (app *application) tryAuthenticate(next http.Handler) http.Handler {
return return
} }
w.Header().Add("Cache-Control", "no-store")
next.ServeHTTP(w, r.WithContext(context.WithValue(r.Context(), ctxUser, user))) next.ServeHTTP(w, r.WithContext(context.WithValue(r.Context(), ctxUser, user)))
}) })
} }