[ Web Proxy ]
URL:
Viewing: https://developers.cloudflare.com/rules/transform/examples/set-response-header-static-value/ [Back]  [Original]

Set response header with a static value Cloudflare Rules docsSkip to content
SearchCtrlKLog in
  1. Home
  2. /Rules
  3. /
  4. /Examples
  5. /Set response header with a static value

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).

Last updated Oct 13, 2025Copy as MarkdownView as MarkdownAgent setup

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.

PreviousSet a response header with the current bot scoreNextOverview

Was this helpful?

YesNo
Edit pageReport issue
[]

Web Proxy Viewer  |  New URL  |  Original Page