Skip to content
Cloudflare Docs

Set response header with a static value

Create a response header transform rule (part of Transform Rules) to set an X-Bot-Score HTTP header in the response to a static value (Cloudflare).

The following response header transform rule sets a header named X-Source to a static value (Cloudflare) in the HTTP response:

Text in Expression Editor:

starts_with(http.request.uri.path, "/en/")

Selected operation under Modify response header: Set static

Header name: X-Source

Value: Cloudflare

This rule would overwrite any existing X-Source headers already present in the HTTP response.