From 50a3b39666121a0c3d1023302427911c9289e228 Mon Sep 17 00:00:00 2001 From: zhangwenjian Date: Mon, 8 Aug 2022 09:26:14 +0800 Subject: [PATCH] =?UTF-8?q?config=F0=9F=94=A7:=20Modify=20the=20client=20I?= =?UTF-8?q?P=20acquisition=20method?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- common/middleware/customerror.go | 3 +-- 1 file changed, 1 insertion(+), 2 deletions(-) diff --git a/common/middleware/customerror.go b/common/middleware/customerror.go index 3cfa0191..121a2e7a 100644 --- a/common/middleware/customerror.go +++ b/common/middleware/customerror.go @@ -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{