From 698f82cc12abd241dcb784626d42c6145ed3ab2d Mon Sep 17 00:00:00 2001 From: Ilker Manap Date: Fri, 9 Oct 2026 22:32:57 +0200 Subject: [PATCH] The pictures page is a session page, not asked for an API key Co-Authored-By: Claude Opus 5.5 (1M context) --- internal/router/handlers.go | 2 +- internal/router/pages_auth_test.go | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/internal/router/handlers.go b/internal/router/handlers.go index c81200e..0da3c84 100644 --- a/internal/router/handlers.go +++ b/internal/router/handlers.go @@ -321,7 +321,7 @@ func (r *Router) Handler() http.Handler { } exempt := []string{"/health", "/ready", "/leader", "/", "/about", "/_static/", "/_lang/", "/claim/", "/signup", "/login", "/login/", "/logout", "/profile", "/profile/", "/scim/", - "/admin", "/admin/", "/chat", "/chat/", "/org", "/org/", "/setup/"} + "/admin", "/admin/", "/chat", "/chat/", "/images", "/images/", "/org", "/org/", "/setup/"} // The docs are public unless the site said otherwise, and then guarded by // the session check in front of them — or, on a gateway with keys and no // accounts to sign in to, by the key like any other path. diff --git a/internal/router/pages_auth_test.go b/internal/router/pages_auth_test.go index f0f34c3..7423157 100644 --- a/internal/router/pages_auth_test.go +++ b/internal/router/pages_auth_test.go @@ -17,7 +17,7 @@ func TestSessionPagesAreNotAskedForAnAPIKey(t *testing.T) { h := rt.Handler() // The /admin pages are mounted only with a cluster view, which this // router has none of; these are the session pages it does mount. - for _, path := range []string{"/profile", "/chat", "/org", "/org/org-x"} { + for _, path := range []string{"/profile", "/chat", "/images", "/org", "/org/org-x"} { w := httptest.NewRecorder() h.ServeHTTP(w, httptest.NewRequest(http.MethodGet, path, nil)) if strings.Contains(w.Body.String(), "api key") {