From ed16da22cf5d94b9f972bbef588c7057801b8382 Mon Sep 17 00:00:00 2001 From: gazebo Date: Mon, 25 Mar 2019 17:30:51 +0800 Subject: [PATCH] - fk --- business/auth2/auth_ctx.go | 2 ++ 1 file changed, 2 insertions(+) diff --git a/business/auth2/auth_ctx.go b/business/auth2/auth_ctx.go index f87dc6b73..2543f2c97 100644 --- a/business/auth2/auth_ctx.go +++ b/business/auth2/auth_ctx.go @@ -52,6 +52,8 @@ func (ctx *Context) GetRealRemoteIP() (ip string) { } if ip == "" { ip = strings.Split(r.RemoteAddr, ":")[0] + } else { + ip = strings.Split(ip, ",")[0] } } return ip