mirror of
https://github.com/bufanyun/hotgo.git
synced 2025-09-24 12:16:39 +08:00
修复部分CDN获取不到真实IP问题
This commit is contained in:
parent
f7307e4fd4
commit
9a434db168
@ -200,5 +200,9 @@ func GetClientIp(r *ghttp.Request) string {
|
|||||||
if gstr.Contains(ip, ",") {
|
if gstr.Contains(ip, ",") {
|
||||||
ip = gstr.TrimStr(ip, ",", -1)
|
ip = gstr.TrimStr(ip, ",", -1)
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if gstr.Contains(ip, ", ") {
|
||||||
|
ip = gstr.TrimStr(ip, ", ", -1)
|
||||||
|
}
|
||||||
return ip
|
return ip
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user