diff --git a/cmd/boardvoting/middleware.go b/cmd/boardvoting/middleware.go index 030883e..5326f05 100644 --- a/cmd/boardvoting/middleware.go +++ b/cmd/boardvoting/middleware.go @@ -88,6 +88,8 @@ func (app *application) tryAuthenticate(next http.Handler) http.Handler { return } + w.Header().Add("Cache-Control", "no-store") + next.ServeHTTP(w, r.WithContext(context.WithValue(r.Context(), ctxUser, user))) }) }