config🔧: Modify the client IP acquisition method
This commit is contained in:
1 parent
087ba38c24
commit
50a3b39666
1 file changed
+1
-2
@@ -2,7 +2,6 @@ package middleware
|
|||||||
|
|
||||||
import (
|
import (
|
||||||
"fmt"
|
"fmt"
|
||||||
"go-admin/common"
|
|
||||||
"net/http"
|
"net/http"
|
||||||
"strconv"
|
"strconv"
|
||||||
"strings"
|
"strings"
|
||||||
@@ -34,7 +33,7 @@ func CustomError(c *gin.Context) {
|
|||||||
c.Request.URL,
|
c.Request.URL,
|
||||||
statusCode,
|
statusCode,
|
||||||
c.Request.RequestURI,
|
c.Request.RequestURI,
|
||||||
common.GetClientIP(c),
|
c.ClientIP(),
|
||||||
p[2],
|
p[2],
|
||||||
)
|
)
|
||||||
c.JSON(http.StatusOK, gin.H{
|
c.JSON(http.StatusOK, gin.H{
|
||||||
|
|||||||
Reference in new issue
Block a user