Create advanced conditional rules for traffic handling
Decision Rules allow you to define advanced conditional logic to automatically block, allow, or monitor traffic based on request attributes and rate limits. Unlike simple block/allow lists, decision rules support complex conditions with multiple fields and operators.
Conditions define when the rule should trigger. They use a hierarchical OR-AND logic:
Each condition specifies:
| Field | Description |
|---|---|
| IP | Client IP address |
| UUID | User identifier |
| GEO Country | Geographic country code |
| User Agent | Browser/client user agent string |
| HTTP Method | Request method (GET, POST, etc.) |
| Referer | Referring URL |
| URL | Request URL path |
| Query String | URL query parameters (requires parameter name) |
| ASN | Autonomous System Number |
| RDNS | Reverse DNS hostname |
| Service Label | Backend service identifier |
| Service DB Label | Service database label |
| UA Label | Categorized user agent label |
| IDC Code | Internet Data Center code |
| BOT Code | Bot classification code |
Operators vary by field data type:
Text fields (IP, UUID, User Agent, URL, etc.):
| Operator | Description |
|---|---|
EQUALS | Exact match |
CONTAINS | Value contains the text |
STARTS_WITH | Value begins with the text |
ENDS_WITH | Value ends with the text |
REGEX | Matches a regular expression |
WILDCARD | Matches a wildcard pattern |
NOT_EQUALS | Does not exactly match |
NOT_CONTAINS | Does not contain the text |
NOT_STARTS_WITH | Does not begin with the text |
NOT_ENDS_WITH | Does not end with the text |
NOT_REGEX | Does not match the regex |
NOT_WILDCARD | Does not match the wildcard |
List fields (GEO Country):
| Operator | Description |
|---|---|
EQUALS | Exact match |
NOT_EQUALS | Does not match |
IN | Value is in the list |
NOT_IN | Value is not in the list |
Configure how the rule evaluates traffic frequency:
For example: "Block if >= 100 matching requests in the past 5 minutes, checking every 5 seconds."
Choose what happens when the rule triggers:
| Action | Description |
|---|---|
| Block | Block matching traffic |
| Unblock | Remove block on matching traffic |
| Monitor | Log without taking action |
The Decision Rules list shows all rules with their name and enable/disable status.
Click Settings on any rule to modify its configuration.
Toggle the Enable switch in the rule settings to activate or deactivate a rule without deleting it.
To block IPs making more than 200 requests per minute:
.* (matches all IPs)