Cloudflare Docs
Ruleset-Engine
Visit Ruleset Engine on GitHub
Set theme to dark (⇧+D)

Phases list

Network layer

Network-layer phases apply to received packets at the edge.

Phase name Used in product/feature
ddos_l4 Network-layer DDoS Attack Protection
magic_transit Magic Firewall

Application layer

Application-layer phases apply to received requests at the edge.

Request phases

The phases execute in the order they appear in the table.

Phase name Used in product/feature
http_request_sanitize URL normalization
http_request_transform URL Rewrite Rules
ddos_l7* HTTP DDoS Attack Protection
http_request_firewall_custom Web Application Firewall (WAF)
http_ratelimit Rate limiting rules
http_request_firewall_managed Web Application Firewall (WAF)
http_request_sbfm Super Bot Fight Mode
http_request_redirect Bulk Redirects
http_request_late_transform HTTP Request Header Modification Rules

* This phase is for configuration purposes only — the corresponding rules will not be executed at this stage in the request handling process.

Response phases

The phases execute in the order they appear in the table.

Phase name Used in product/feature
http_response_headers_transform HTTP Response Header Modification Rules
http_response_firewall_managed Cloudflare Sensitive Data Detection (Data Loss Prevention)
http_log_custom_fields Logpush custom fields