public class LocalHostMatcher extends InetHostMatcher
Example 1: Accept any localhost url
- localMatch {}
Example 2: Accept any localhost url (port == -1 accepts any port)
- localMatch
port : -1
Example 3: Accept any localhost url on port 80 only
- localMatch
port : 80
Example 4: Accept localhost urls with paths that start with /print/.
If the regular expression given does not start with / then it will be added because all paths start with /.
- localMatch
pathRegex : /print/.+
[[examples=http_processors]]InetHostMatcher.AddressMaskpathRegex, port| Constructor and Description |
|---|
LocalHostMatcher() |
| Modifier and Type | Method and Description |
|---|---|
protected java.util.List<InetHostMatcher.AddressMask> |
createAuthorizedIPs()
Get the full list of authorized IP addresses and the masks.
|
java.lang.String |
toString() |
void |
validate(java.util.List<java.lang.Throwable> validationErrors,
Configuration configuration)
validate that the configuration was correct.
|
clearAuthorizedIPs, equals, hashCode, tryOverrideValidationmatches, setPathRegex, setPortisReject, setRejectprotected final java.util.List<InetHostMatcher.AddressMask> createAuthorizedIPs() throws java.net.SocketException
InetHostMatchercreateAuthorizedIPs in class InetHostMatcherjava.net.SocketExceptionpublic final void validate(java.util.List<java.lang.Throwable> validationErrors,
Configuration configuration)
ConfigurationObjectvalidationErrors - a list to add any detected errors to.configuration - the containing configurationpublic final java.lang.String toString()
toString in class HostMatcher