Skip to content

Commit 9c5ac29

Browse files
committed
fix(request_logging): update logging conditions to include only /v1 paths
1 parent 7980f05 commit 9c5ac29

File tree

1 file changed

+6
-1
lines changed

1 file changed

+6
-1
lines changed

internal/api/middleware/request_logging.go

Lines changed: 6 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -19,7 +19,12 @@ import (
1919
func RequestLoggingMiddleware(logger logging.RequestLogger) gin.HandlerFunc {
2020
return func(c *gin.Context) {
2121
path := c.Request.URL.Path
22-
if strings.HasPrefix(path, "/v0/management") || path == "/keep-alive" {
22+
shouldLog := false
23+
if strings.HasPrefix(path, "/v1") {
24+
shouldLog = true
25+
}
26+
27+
if !shouldLog {
2328
c.Next()
2429
return
2530
}

0 commit comments

Comments
 (0)