Skip to content

Set a response header with the current bot score

Create a response header modification rule (part of Transform Rules) to set an X-Bot-Score HTTP header in the response with 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.