IP 地址的检查
String remoteHost = request.getRemoteHost();
if (request.getHeader("x-forwarded-for") != null) {
String header = request.getHeader("x-forwarded-for");
String[] ips = header.split(",");
if (ips.length > 0) {
remoteHost = ips[0];
}
}
if(i= -1 && (remoteHost.indexOf("XXX.XXX") > -1 || remoteHost.indexOf("192.168") > -1 || remoteHost.indexOf("XXX.XXX.XXX.XXX")> -1 || remoteHost.indexOf("XXX.XXX")> -1|| remoteHost.indexOf("127.0.0.1")> -1 || remoteHost.indexOf("XXX.11")> -1)){
}else if(i!= -1) {
System.out.println("illegal IP: " + remoteHost + " " + subjectId);
return ;
}