public class ZRefererUtil
extends java.lang.Object
构造器和说明 |
---|
ZRefererUtil() |
限定符和类型 | 方法和说明 |
---|---|
static boolean |
inIpBlacklist(java.lang.String ip,
java.lang.String[] ips)
IP黑名单
|
static boolean |
notInIgnoreUrl(java.lang.String url) |
static boolean |
notInWhiteReferer(javax.servlet.http.HttpServletRequest request,
java.lang.String[] urls,
java.lang.String[] servers) |
static boolean |
verifyRefer(javax.servlet.http.HttpServletRequest request,
java.lang.String[] urls,
java.lang.String[] servers)
验证referer
|
public static boolean verifyRefer(javax.servlet.http.HttpServletRequest request, java.lang.String[] urls, java.lang.String[] servers)
request
- 请求urls
- 白名单urlservers
- 白名单serverspublic static boolean notInWhiteReferer(javax.servlet.http.HttpServletRequest request, java.lang.String[] urls, java.lang.String[] servers)
public static boolean inIpBlacklist(java.lang.String ip, java.lang.String[] ips)
ip
- 请求ips
- IP黑名单列表public static boolean notInIgnoreUrl(java.lang.String url)