|
|||||
FRAMES NO FRAMES | |||||
SUMMARY: NESTED | FIELD | CONSTR | METHOD | DETAIL: FIELD | CONSTR | METHOD |
Blocks access to protected resources based on IP address. Sends 404 rather than
reporting error to hide visibility of the resources.
Supports either Ant-style patterns (e.g. 10.**) or masked patterns
(e.g. 192.168.1.0/24 or 202.24.0.0/14).
Field Summary | |
---|---|
Logger |
_log
|
AntPathMatcher |
_pathMatcher
|
Map |
_restrictions
|
Constructor Summary | |
IpAddressFilter()
|
Method Summary | |
---|---|
void |
afterPropertiesSet()
|
void |
doFilterHttp(HttpServletRequest request, HttpServletResponse response, FilterChain chain)
|
int |
getOrder()
|
boolean |
isAllowed(String ip, String requestURI)
|
boolean |
matchesUsingMask(String ipPattern, String ip)
|
InetAddress |
parseAddress(String address)
|
void |
setIpRestrictions(Map restrictions)
Dependency injection for the ip/pattern restriction map. |
Constructor Detail |
---|
IpAddressFilter()
Method Detail |
---|
public void afterPropertiesSet()
void doFilterHttp(HttpServletRequest request, HttpServletResponse response, FilterChain chain)
public int getOrder()
boolean isAllowed(String ip, String requestURI)
boolean matchesUsingMask(String ipPattern, String ip)
InetAddress parseAddress(String address)
public void setIpRestrictions(Map restrictions)