Ruleset
Source:
src/Cloudflare/Ruleset/Ruleset.ts
A Cloudflare Ruleset phase entrypoint for a zone.
This resource owns the entire ruleset for a phase entrypoint. Rules managed elsewhere in the same phase can be overwritten on deploy.
WAF Rules
Section titled “WAF Rules”const zone = yield* Cloudflare.Zone("MyZone", { name: "example.com" });const waf = yield* Cloudflare.Ruleset("WafRules", { zone, phase: "http_request_firewall_custom", rules: [ { description: "Block exploit probes", expression: `lower(http.request.uri.path) contains "/.env"`, action: "block", }, ],});