diff --git a/changelog.d/changed-16574.md b/changelog.d/changed-16574.md new file mode 100644 index 0000000000..61b4edcbee --- /dev/null +++ b/changelog.d/changed-16574.md @@ -0,0 +1 @@ +- Document why dashboard matrix authentication failures also receive `Cache-Control: no-store`. diff --git a/src/pkg/dashboard/server.go b/src/pkg/dashboard/server.go index 62a6fc0255..6427763fac 100644 --- a/src/pkg/dashboard/server.go +++ b/src/pkg/dashboard/server.go @@ -1979,7 +1979,7 @@ code{color:#e6edf3} func (s *Server) authenticate(next http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { if r.URL.Path == "/api/matrix/lines" { - w.Header().Set("Cache-Control", "no-store") + w.Header().Set("Cache-Control", "no-store") // Cover 401 responses that never reach handleMatrixLines' no-store header. } directRouteAuthz := s.directRouteAuthzEnabled()