This commit is contained in:
gazebo
2019-03-25 17:30:51 +08:00
parent 679b8c7dff
commit ed16da22cf

View File

@@ -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