refactor🎨: 调整客户端ip获取方法以及日志中对应位置更新

This commit is contained in:
zhangwenjian committed 2021-06-13 21:20:07 +08:00
1 parent ed52efaa44
commit e0cf7af7a9
4 files changed
+28 -10

No files matched your search

+2 -1
View File
@@ -2,6 +2,7 @@ package middleware
import (
"fmt"
"go-admin/common"
"net/http"
"strconv"
"strings"
@@ -33,7 +34,7 @@ func CustomError(c *gin.Context) {
c.Request.URL,
statusCode,
c.Request.RequestURI,
c.ClientIP(),
common.GetClientIP(c),
p[2],
)
c.JSON(http.StatusOK, gin.H{