mirror of
https://github.com/twofas/2fas-server.git
synced 2024-11-25 03:41:06 +01:00
Merge pull request #3 from twofas/fix/do-not-log-client-ip
Disable client-ip logging
This commit is contained in:
commit
ba6c0abfeb
@ -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