Class DnsHostMatcher

All Implemented Interfaces:
ConfigurationObject, URIMatcher

public class DnsHostMatcher extends HostMatcher
Allows to check that a given URL matches a DNS address (textual format). The actual comparison is performed on numerical IP addresses. The configured DNS host address is transformed into numerical IP addresses during application startup. The urls to be compared are transformed during the print processing.

Example 1: Accept any www.camptocamp.com url


     - !dnsMatch
       host: www.camptocamp.com
 

Example 2: Accept any www.camptocamp.com url (port == -1 accepts any port)


     - !dnsMatch
       host: www.camptocamp.com
       port: -1
 

Example 3: Accept any www.camptocamp.com url on port 80 only


     - !dnsMatch
       host: www.camptocamp.com
       port: 80
 
Example 4: Accept www.camptocamp.com urls with paths that start with /print/.

If the regular expression give does not start with / then it will be added because all paths start with /


     - !dnsMatch
       host: www.camptocamp.com
       pathRegex: /print/.+
 
[[examples=http_processors]]