Overview
Path Filter is used to determine if a particular policy should be applied or not based on the provided expression.
A list of patterns is used to describe a subset of requests that are included (or excluded) by this policy.
By default, the patterns you add to this list are interpreted as described in the subset of requests included in this policy and all others will be ignored.
Optionally, you may use an exclamation point on each element to describe the subset of requests excluded from this policy and all other requests will be included.
Expressions can either be used as Path Filter or URL Filter. If the expression starts with [protocol]://
, then it is considered to be a URL Filter.
In URL filter, along with Path Match, there is also support for protocol and host name match. Path Filter supports three types of matching: wildcard match, glob match and regex match.
You should not mix include and exclude patterns in the same list.
Examples
PATTERN | DESCRIPTION | EXAMPLE MATCH REQUESTS |
wildcard: http://* | Only HTTP requests | http://hwcdn.net/a2a2a2a2/cds/index.html |
wildcard: https://* | Only HTTPs requests | https://anyhostname.com/a2a2a2a2/cds/dir/smpl.jpg |
wildcard: *://foo.com/* | HTTP/HTTPs request for foo.com HostName | http://foo.com/a2a2a2a2/cds/index.html, https://foo.com/a2a2a2a2/cds/dir/anydirORfile |
wildcard: *://*.html | Any request for HTML files | http://foo.com/a2a2a2a2/cds/index.html, https://aynthing.com/a2a2a2a2/cds/index.html |
wildcard: !://.txt | Any request except TXT files | http://foo.com/a2a2a2a2/cds/index.html, https://aynthing.com/a2a2a2a2/cds/dir/smpl.jpg |
wildcard: *://.html,://*.js | Any HTML file or JS files | http://foo.com/a2a2a2a2/cds/index.html, https://foo.com/a2a2a2a2/cds/dir/any.js |
wildcard: !://.txt,!://.jpg | Any request except TXT and JPG files | http://foo.com/a2a2a2a2/cds/index.html, https://foo.com/a2a2a2a2/cds/dir/any.csv |
wildcard: *://hwcdn.net/static/*.html | Any request for HTML file under Directory (recursive) "static" | http://hwcdn.net/static/index.html, http://hwcdn.net/static/foo.html, http://hwcdn.net/static/2/index.html,http://hwcdn.net/static/2/st/index.html |
glob: *://hwcdn.net/static/*.html |
Any request for HTML file under Directory (one level) "static" | http://hwcdn.net/static/index.html, https://hwcdn.net/static/foo.html |
regex: /https?://hwcdn.*\d/index.html/ | HTTP/HTTPs request for index.html under directory of Numbers | http://hwcdn.net/static/1/index.html, https://hwcdn.net/static/20/100/index.html |