ä¿修复获取客户端IP返回多个ip的问题
This commit is contained in:
parent
c1de1113c4
commit
de793ec01d
|
|
@ -40,7 +40,9 @@ public class IpUtils
|
|||
ip = request.getRemoteAddr();
|
||||
}
|
||||
|
||||
return "0:0:0:0:0:0:0:1".equals(ip) ? "127.0.0.1" : ip;
|
||||
ip = "0:0:0:0:0:0:0:1".equals(ip) ? "127.0.0.1" : ip;
|
||||
ip = ip.split(",")[0].trim();
|
||||
return ip;
|
||||
}
|
||||
|
||||
public static boolean internalIp(String ip)
|
||||
|
|
|
|||
Loading…
Reference in New Issue