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