fix: skip logging unmatched 303 redirects

This commit is contained in:
2026-06-27 16:30:39 +02:00
parent 88c066398e
commit 9acb9218c2

View File

@@ -2,6 +2,7 @@ package server
import (
"mal/internal/observability"
"net/http"
"time"
"github.com/gin-gonic/gin"
@@ -38,6 +39,9 @@ func RequestLogger() gin.HandlerFunc {
if route == "/watch/proxy/stream" && status < 400 && len(privateErrors) == 0 {
return
}
if c.FullPath() == "" && status == http.StatusSeeOther {
return
}
if route != path {
fields["route"] = route
}