Cloudflare

Modifying HTTP response headers with Transform Rules

Nov 18, 2021Sam Marsh
Modifying HTTP response headers with Transform Rules
SummaryAI, from the source post

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