diff options
Diffstat (limited to 'pkg/ext/auth.go')
-rw-r--r-- | pkg/ext/auth.go | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/pkg/ext/auth.go b/pkg/ext/auth.go index b57e86a..304f4ad 100644 --- a/pkg/ext/auth.go +++ b/pkg/ext/auth.go @@ -3,6 +3,7 @@ package ext import ( "context" "encoding/base64" + "errors" "log/slog" "net/http" ) @@ -24,7 +25,9 @@ func Authenticate(auth authService) func(next http.HandlerFunc) http.HandlerFunc return func(w http.ResponseWriter, r *http.Request) { cookie, err := r.Cookie("auth") if err != nil { - slog.Error("Error loading cookie", "error", err) + if !errors.Is(err, http.ErrNoCookie) { + slog.Error("Error loading cookie", "error", err) + } next(w, r) return } |