fix: skip logging unmatched 303 redirects
This commit is contained in:
@@ -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
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user