Decision Rules

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.

Creating a Decision Rule

  1. Navigate to Decision Rules in the sidebar
  2. Click New Decision Rule
  3. Configure the rule sections described below
  4. Click Save

Rule Configuration

Basic Settings

  • Name — A descriptive name for the rule
  • Enable — Toggle to activate or deactivate the rule
  • Project — Select which project this rule applies to

Rule Conditions

Conditions define when the rule should trigger. They use a hierarchical OR-AND logic:

  • Multiple condition groups are combined with OR (any group matching triggers the rule)
  • Within each group, multiple conditions are combined with AND (all conditions must match)

Each condition specifies:

  • Field — The request attribute to evaluate
  • Operator — How to compare the value
  • Value — The value to match against

Available Fields

FieldDescription
IPClient IP address
UUIDUser identifier
GEO CountryGeographic country code
User AgentBrowser/client user agent string
HTTP MethodRequest method (GET, POST, etc.)
RefererReferring URL
URLRequest URL path
Query StringURL query parameters (requires parameter name)
ASNAutonomous System Number
RDNSReverse DNS hostname
Service LabelBackend service identifier
Service DB LabelService database label
UA LabelCategorized user agent label
IDC CodeInternet Data Center code
BOT CodeBot classification code

Operators

Operators vary by field data type:

Text fields (IP, UUID, User Agent, URL, etc.):

OperatorDescription
EQUALSExact match
CONTAINSValue contains the text
STARTS_WITHValue begins with the text
ENDS_WITHValue ends with the text
REGEXMatches a regular expression
WILDCARDMatches a wildcard pattern
NOT_EQUALSDoes not exactly match
NOT_CONTAINSDoes not contain the text
NOT_STARTS_WITHDoes not begin with the text
NOT_ENDS_WITHDoes not end with the text
NOT_REGEXDoes not match the regex
NOT_WILDCARDDoes not match the wildcard

List fields (GEO Country):

OperatorDescription
EQUALSExact match
NOT_EQUALSDoes not match
INValue is in the list
NOT_INValue is not in the list

Rate Limiting

Configure how the rule evaluates traffic frequency:

  • Check Frequency — How often to evaluate the rule (in seconds)
  • Rate Action — Trigger when rate is (greater than or equal) or (less than) the threshold
  • Rate — Number of matching requests to trigger the action
  • Time Window — The time period to count requests (in minutes)

For example: "Block if >= 100 matching requests in the past 5 minutes, checking every 5 seconds."

Action

Choose what happens when the rule triggers:

ActionDescription
BlockBlock matching traffic
UnblockRemove block on matching traffic
MonitorLog without taking action

Managing Decision Rules

Viewing Rules

The Decision Rules list shows all rules with their name and enable/disable status.

Editing a Rule

Click Settings on any rule to modify its configuration.

Enabling/Disabling a Rule

Toggle the Enable switch in the rule settings to activate or deactivate a rule without deleting it.

Deleting a Rule

  1. Open the rule settings
  2. Scroll to the Danger Zone
  3. Type the rule name to confirm
  4. Click Delete

Example: Rate-Limit by IP

To block IPs making more than 200 requests per minute:

  1. Create a new Decision Rule
  2. Set Name to "Rate limit by IP"
  3. Select your Project
  4. Add a condition: Field = IP, Operator = REGEX, Value = .* (matches all IPs)
  5. Set Rate Action to >=
  6. Set Rate to 200
  7. Set Time Window to 1 minute
  8. Set Check Frequency to 5 seconds
  9. Set Action to Block
  10. Enable the rule and save