fix(request_logging): update logging conditions to include only /v1 paths

This commit is contained in:
Luis Pater
2025-10-16 09:57:27 +08:00
parent 7980f055fa
commit 9c5ac2927a

View File

@@ -19,7 +19,12 @@ import (
func RequestLoggingMiddleware(logger logging.RequestLogger) gin.HandlerFunc {
return func(c *gin.Context) {
path := c.Request.URL.Path
if strings.HasPrefix(path, "/v0/management") || path == "/keep-alive" {
shouldLog := false
if strings.HasPrefix(path, "/v1") {
shouldLog = true
}
if !shouldLog {
c.Next()
return
}