refactor: get ClientIP (#1502)

* 调整ClientIP获取
This commit is contained in:
alick-liming 2023-04-27 07:56:34 +05:30 committed by GitHub
parent c733f16cc7
commit 199a23e385
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -36,7 +36,7 @@ func (rt *Router) heartbeat(c *gin.Context) {
ginx.Dangerous(err)
req.Offset = (time.Now().UnixMilli() - req.UnixTime)
req.RemoteAddr = c.Request.RemoteAddr
req.RemoteAddr = c.ClientIP()
rt.MetaSet.Set(req.Hostname, req)
gid := ginx.QueryInt64(c, "gid", 0)