diff --git a/src/content/docs/rules/transform/request-header-modification/reference/fields-functions.mdx b/src/content/docs/rules/transform/request-header-modification/reference/fields-functions.mdx index c85a5b8a278a6f..b68192c88c4111 100644 --- a/src/content/docs/rules/transform/request-header-modification/reference/fields-functions.mdx +++ b/src/content/docs/rules/transform/request-header-modification/reference/fields-functions.mdx @@ -12,6 +12,6 @@ import { Render } from "~/components"; The available fields when setting an HTTP request header value using an expression are the following: - + For information on the available functions, refer to [Functions](/ruleset-engine/rules-language/functions/). diff --git a/src/content/docs/rules/transform/response-header-modification/reference/fields-functions.mdx b/src/content/docs/rules/transform/response-header-modification/reference/fields-functions.mdx index 4dd91e12a87e53..3c603e09a7f565 100644 --- a/src/content/docs/rules/transform/response-header-modification/reference/fields-functions.mdx +++ b/src/content/docs/rules/transform/response-header-modification/reference/fields-functions.mdx @@ -12,6 +12,6 @@ import { Render } from "~/components"; The available fields when setting an HTTP response header value using an expression are the following: - + For information on the available functions, refer to [Functions](/ruleset-engine/rules-language/functions/). diff --git a/src/content/partials/rules/transform/header-modification-fields.mdx b/src/content/partials/rules/transform/header-modification-fields.mdx index 4f9bb6e21049a6..4ce2bd455c30fc 100644 --- a/src/content/partials/rules/transform/header-modification-fields.mdx +++ b/src/content/partials/rules/transform/header-modification-fields.mdx @@ -1,10 +1,14 @@ --- -{} +params: + - location --- +import { Markdown } from "~/components"; + - `cf.bot_management.*` - `cf.client.bot` - `cf.threat_score` +- `cf.verified_bot_category` - `cf.edge.server_ip` - `cf.edge.server_port` - `cf.edge.client_port` @@ -16,6 +20,7 @@ - `http.host` - `http.referer` - `http.request.headers` +- `http.request.headers.*` - `http.request.accepted_languages` - `http.request.method` - `http.request.timestamp.sec` @@ -26,6 +31,9 @@ - `http.request.version` - `raw.http.request.full_uri` - `raw.http.request.uri` +- `raw.http.request.uri.*` +- `raw.http.request.headers` +- `raw.http.request.headers.*` - `http.user_agent` - `http.x_forwarded_for` - `ip.src` @@ -35,16 +43,46 @@ - `ip.src.city` - `ip.src.country` - `ip.src.continent` +- `ip.src.metro_code` +- `ip.src.postal_code` +- `ip.src.region` +- `ip.src.region_code` - `ip.src.is_in_european_union` - `ip.src.subdivision_1_iso_code` - `ip.src.subdivision_2_iso_code` - `ssl` +{ props.location === "request" && ( + <> +
    +
  • http.request.jwt.claims
  • +
  • http.request.jwt.claims.*
  • +
  • cf.waf.auth_detected
  • +
  • cf.waf.credential_check.*
  • +
  • cf.waf.score
  • +
  • cf.waf.score.*
  • +
+ +)} + +{ props.location === "response" && ( + <> +
    +
  • http.response.code
  • +
  • http.response.headers
  • +
  • http.response.headers.*
  • +
  • http.response.content_type.media_type
  • +
  • cf.response.1xxx_code
  • +
  • cf.response.error_type
  • +
+ +)} + Refer to [Fields](/ruleset-engine/rules-language/fields/reference/) for reference information on these fields. :::caution[Important] -- To obtain the value of an HTTP request header using the [`http.request.headers`](/ruleset-engine/rules-language/fields/reference/http.request.headers/) field, specify the header name in **lowercase**. For example, to get the first value of the `Accept-Encoding` request header in an expression, use: `http.request.headers["accept-encoding"][0]`. +- To obtain the value of an HTTP header using the [`http.request.headers`](/ruleset-engine/rules-language/fields/reference/http.request.headers/) { props.location === "response" ? : 'field' }, specify the header name in **lowercase**. For example, to get the first value of the `Accept-Encoding` request header in an expression, use: `http.request.headers["accept-encoding"][0]`. - Use the `to_string()` function to get the string representation of a non-string value like an Integer value. For example, `to_string(cf.bot_management.score)`.