From d50c2a71ef31dc3fd69c27694b6877cd74a0afc3 Mon Sep 17 00:00:00 2001 From: Tobiasz Heller <14020794+tobiaszheller@users.noreply.github.com> Date: Mon, 22 May 2023 19:31:54 +0200 Subject: [PATCH] Disable client-ip logging --- internal/common/http/log.go | 5 ++--- 1 file changed, 2 insertions(+), 3 deletions(-) diff --git a/internal/common/http/log.go b/internal/common/http/log.go index 232d9c3..7480d2e 100644 --- a/internal/common/http/log.go +++ b/internal/common/http/log.go @@ -2,9 +2,10 @@ package http import ( "bytes" + "io" + "github.com/gin-gonic/gin" "github.com/twofas/2fas-server/internal/common/logging" - "io" ) func RequestJsonLogger() gin.HandlerFunc { @@ -17,7 +18,6 @@ func RequestJsonLogger() gin.HandlerFunc { c.Request.Body = io.NopCloser(&buf) logging.WithFields(logging.Fields{ - "client_ip": c.ClientIP(), "method": c.Request.Method, "path": c.Request.URL.Path, "headers": c.Request.Header, @@ -29,7 +29,6 @@ func RequestJsonLogger() gin.HandlerFunc { c.Next() logging.WithFields(logging.Fields{ - "client_ip": c.ClientIP(), "method": c.Request.Method, "path": c.Request.URL.Path, "request_id": c.GetString(RequestIdKey),