Skip to content

Commit 13b163f

Browse files
authored
[Ruleset Engine] Fields reference: Add raw fields (#25937)
1 parent 9e124ee commit 13b163f

File tree

1 file changed

+41
-0
lines changed

1 file changed

+41
-0
lines changed

src/content/fields/index.yaml

Lines changed: 41 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -455,6 +455,47 @@ entries:
455455
456456
**Note**: This raw field may include some basic normalization done by Cloudflare's HTTP server. However, this can change in the future.
457457
458+
- name: raw.http.response.headers
459+
data_type: Map<Array<String>>
460+
categories: [Response, Headers, Raw fields]
461+
keywords: [response, raw]
462+
summary: The HTTP response headers without any transformation represented as a Map (or associative array).
463+
description: |-
464+
This is the raw field version of the [`http.response.headers`](/ruleset-engine/rules-language/fields/reference/http.response.headers/) field. Raw fields, prefixed with `raw.`, preserve original response values for later evaluations. These fields are immutable during the entire request evaluation workflow, and they are not affected by the actions of previously matched rules.
465+
example_value: |-
466+
{"server": ["nginx"]}
467+
example_block: |-
468+
any(raw.http.response.headers["server"][*] == "nginx")
469+
470+
- name: raw.http.response.headers.names
471+
data_type: Array<String>
472+
categories: [Response, Headers, Raw fields]
473+
keywords: [response, raw]
474+
summary: The names of the headers in the HTTP response without any transformation.
475+
description: |-
476+
This is the raw field version of the [`http.response.headers.names`](/ruleset-engine/rules-language/fields/reference/http.response.headers.names/) field. Raw fields, prefixed with `raw.`, preserve original response values for later evaluations. These fields are immutable during the entire request evaluation workflow, and they are not affected by the actions of previously matched rules.
477+
example_value: |-
478+
["content-type"]
479+
example_block: |-
480+
any(raw.http.response.headers.names[*] == "content-type")
481+
482+
- name: raw.http.response.headers.values
483+
data_type: Array<String>
484+
categories: [Response, Headers, Raw fields]
485+
keywords: [response, raw]
486+
summary: The values of the headers in the HTTP response without any transformation.
487+
description: |-
488+
This is the raw field version of the [`http.response.headers.values`](/ruleset-engine/rules-language/fields/reference/http.response.headers.values/) field. Raw fields, prefixed with `raw.`, preserve original response values for later evaluations. These fields are immutable during the entire request evaluation workflow, and they are not affected by the actions of previously matched rules.
489+
example_value: |-
490+
Example 1: ["application/json"]
491+
Example 2: ["This header value is longer than 10 bytes"]
492+
example_block: |-
493+
# Example 1: Check for specific header value.
494+
any(raw.http.response.headers.values[*] == "application/json")
495+
496+
# Example 2: Match requests according to the specified operator and the length/size entered for the header value.
497+
any(len(raw.http.response.headers.values[*])[*] gt 10)
498+
458499
- name: ssl
459500
data_type: Boolean
460501
categories: [Request]

0 commit comments

Comments
 (0)