From 7170db2a10788c47c5d449bceb861d5be83bd52e Mon Sep 17 00:00:00 2001 From: mendezr Date: Wed, 4 Nov 2026 08:57:30 +0000 Subject: [PATCH 1/2] =?UTF-8?q?=F0=9F=93=96=20docs:=20explain=20matrix=20n?= =?UTF-8?q?o-store=20header=20in=20auth=20middleware?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Preserve the reason for the duplicated cache policy: authentication can return 401 before the matrix handler runs. Hive-Run: hivecommons/hive#16529 Hive-Plan: document-matrix-auth-cache-policy Hive-Spec: hivecommons/hive#16529#401-no-store Signed-off-by: mendezr --- src/pkg/dashboard/server.go | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) 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() From a682acb72d0975c9450e85e3a96e3e7d78ecacb0 Mon Sep 17 00:00:00 2001 From: mendezr Date: Wed, 4 Nov 2026 09:00:56 +0000 Subject: [PATCH 2/2] =?UTF-8?q?=F0=9F=93=96=20docs:=20add=20matrix=20cache?= =?UTF-8?q?-policy=20changelog=20fragment?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit Record the documentation change so changelog-fragment-guard can admit this PR without a maintainer-only no-changelog label. Signed-off-by: mendezr --- changelog.d/changed-16574.md | 1 + 1 file changed, 1 insertion(+) create mode 100644 changelog.d/changed-16574.md 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`.