Class GuardPredicateFactory

java.lang.Object
org.frontcache.guard.GuardPredicateFactory

public class GuardPredicateFactory extends Object
Parses a single predicate expression from guard-rules.conf into a GuardPredicate. Grammar (see docs/frontcache-protection-tech-design.md): [!] host:ip [!] host~<regex> [!] ua~<regex> [!] ua-contains:<literal> (case-insensitive) [!] client-ip:<cidr|address|@file> [!] uri~<regex> [!] query~<regex> [!] url~<regex> [!] method:<GET|POST|...> [!] client-type:<bot|guest> [!] cookie:<name> [!] header:<name>[~<regex>] [!] request-type:<toplevel|include|include-async> rate:<limit>/<window> [bucket=<name>] [scope=<toplevel|all>] (never negated) Regexes are compiled once, here, and matched with find() semantics - the same behaviour as dynamic-urls.conf patterns.