Cloudflare Docs
Rules
Rules
Edit this page
Report an issue with this page
Log into the Cloudflare dashboard
Set theme to dark (⇧+D)

Set an HTTP response header to the current bot score

The following HTTP response header modification rule sets a header named X-Bot-Score to the current bot score in the response:

Text in Expression Editor:

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

Selected operation under Modify response header: Set dynamic

Header name: X-Bot-Score

Value: to_string(cf.bot_management.score)

This rule would overwrite any existing X-Bot-Score headers already present in the response.