From df3a6e361070366579a66b70ac241b015224e90e Mon Sep 17 00:00:00 2001 From: mkelvers Date: Sat, 18 Apr 2026 00:02:42 +0200 Subject: [PATCH] fix: allow dist assets without auth --- internal/shared/middleware/auth.go | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/internal/shared/middleware/auth.go b/internal/shared/middleware/auth.go index bbcfa07..de7b8b3 100644 --- a/internal/shared/middleware/auth.go +++ b/internal/shared/middleware/auth.go @@ -60,7 +60,8 @@ func RequireAuth(next http.Handler) http.Handler { func RequireGlobalAuth(next http.Handler) http.Handler { return http.HandlerFunc(func(w http.ResponseWriter, r *http.Request) { // Allow unauthenticated access to login, register, search, and static files - if r.URL.Path == "/login" || r.URL.Path == "/register" || r.URL.Path == "/recover" || strings.HasPrefix(r.URL.Path, "/static/") || + if r.URL.Path == "/login" || r.URL.Path == "/register" || r.URL.Path == "/recover" || + strings.HasPrefix(r.URL.Path, "/static/") || strings.HasPrefix(r.URL.Path, "/dist/") || r.URL.Path == "/search" || r.URL.Path == "/api/search" || r.URL.Path == "/api/search-quick" || r.URL.Path == "/" { next.ServeHTTP(w, r)