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