Modifying HTTP response headers with Transform Rules
Nov 18, 2021Sam Marsh

Summary
Introduced a new action within Transform Rules: "HTTP Response Header Modification". This allows users to set or remove HTTP response headers as traffic returns to the client, providing an easier alternative to Cloudflare Workers for this functionality. It supports setting dynamic values (e.g., bot score, visitor country) and static literal strings, as well as removing headers. Cloudflare functions like concat(), regex_replace(), to_string(), and lower() can be used within 'set dynamic' modifications. The rule builder offers filtering based on various parameters like visitor country, bot score, user agent, etc.
More from the Website Security & Threat Management trail
- We tested our own WAF with frontier AI models. Here’s what we found
- When scanners miss the attack: how Cloudflare Client-Side Security protects storefronts
- Introducing automatic remediation policies with Cloudflare CASB
- Introducing context-aware vulnerability discovery and remediation with Cloudflare Managed Defense and OpenAI Daybreak Models
- Introducing Adaptive Intelligence: undermining the economics of every bot attack