mirror of
https://github.com/twofas/2fas-server.git
synced 2024-11-24 19:30:51 +01:00
Disable client-ip logging
This commit is contained in:
parent
d0137e26d1
commit
d50c2a71ef
@ -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),
|
||||
|
Loading…
Reference in New Issue
Block a user