Interface GuardPredicate
- All Known Implementing Classes:
RateLimitPredicate
public interface GuardPredicate
One condition of a guard rule (e.g. "uri~^/admin/", "!cookie:hruc").
Implementations run on the request thread for every request, before cache and origin, so they
must be cheap and must never throw: a predicate that cannot decide returns false.
-
Method Summary
-
Method Details
-
test
- Parameters:
context- request context - may carry a null servlet request (async include, or a synthetic probe context used for startup loop detection)- Returns:
- true when this condition holds for the request
-
describe
String describe()- Returns:
- the predicate as written in guard-rules.conf (used by logs and the admin API)
-