mirror of
https://gitee.com/huangge1199_admin/vue-pro.git
synced 2024-11-23 07:41:53 +08:00
IpUtils工具,清除Xss特殊字符,防止Xff注入攻击
This commit is contained in:
parent
33f09d7747
commit
19b8688759
@ -40,7 +40,7 @@ public class IpUtils
|
||||
{
|
||||
ip = request.getRemoteAddr();
|
||||
}
|
||||
|
||||
ip = EscapeUtil.clean(ip);//清除Xss特殊字符
|
||||
return "0:0:0:0:0:0:0:1".equals(ip) ? "127.0.0.1" : ip;
|
||||
}
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user