config🔧: Modify the client IP acquisition method

This commit is contained in:
zhangwenjian committed 2022-08-08 09:26:14 +08:00
1 parent 087ba38c24
commit 50a3b39666
1 file changed
+1 -2
+1 -2
View File
@@ -2,7 +2,6 @@ package middleware
import (
"fmt"
"go-admin/common"
"net/http"
"strconv"
"strings"
@@ -34,7 +33,7 @@ func CustomError(c *gin.Context) {
c.Request.URL,
statusCode,
c.Request.RequestURI,
common.GetClientIP(c),
c.ClientIP(),
p[2],
)
c.JSON(http.StatusOK, gin.H{