Skip to content

Commit 3d3ad5c

Browse files
committed
[Ruleset Engine] Update definition of raw fields
1 parent 47d91b7 commit 3d3ad5c

File tree

3 files changed

+66
-9
lines changed

3 files changed

+66
-9
lines changed

src/content/docs/ruleset-engine/rules-language/fields/standard-fields.mdx

Lines changed: 34 additions & 6 deletions
Original file line numberDiff line numberDiff line change
@@ -8,7 +8,7 @@ head:
88
content: Standard fields | Fields reference
99
---
1010

11-
import { Details } from "~/components";
11+
import { Details, Render } from "~/components";
1212

1313
Most standard fields use the same naming conventions as [Wireshark display fields](https://www.wireshark.org/docs/wsug_html_chunked/ChWorkBuildDisplayFilterSection.html). However, there are some subtle differences between Cloudflare and Wireshark:
1414

@@ -476,37 +476,65 @@ This field has the same value as the `ip.geoip.is_in_european_union` field, whic
476476

477477
`raw.http.request.full_uri` `String`
478478

479-
Similar to the [`http.request.full_uri`](#httprequestfull_uri) non-raw field. Represents the full URI as received by the web server without the URI fragment (if any) and without any transformation.
479+
Represents the raw full URI as received by the web server without the URI fragment (if any) and without any transformation.
480+
481+
<Render
482+
file="raw-fields-definition-with-link"
483+
params={{ fieldLink: "[`http.request.full_uri`](#httprequestfull_uri)" }}
484+
/>
480485

481486
**Note:** This raw field may include some basic normalization done by Cloudflare's HTTP server. However, this can change in the future.
482487

483488
## `raw.http.request.uri`
484489

485490
`raw.http.request.uri` `String`
486491

487-
Similar to the [`http.request.uri`](#httprequesturi) non-raw field. Represents the URI path and query string of the request without any transformation.
492+
Represents the raw URI path and query string of the request without any transformation.
493+
494+
<Render
495+
file="raw-fields-definition-with-link"
496+
params={{ fieldLink: "[`http.request.uri`](#httprequesturi)" }}
497+
/>
488498

489499
**Note:** This raw field may include some basic normalization done by Cloudflare's HTTP server. However, this can change in the future.
490500

491501
## `raw.http.request.uri.path`
492502

493503
`raw.http.request.uri.path` `String`
494504

495-
Similar to the [`http.request.uri.path`](#httprequesturipath) non-raw field. Represents the URI path of the request without any transformation.
505+
Represents the raw URI path of the request without any transformation.
506+
507+
<Render
508+
file="raw-fields-definition-with-link"
509+
params={{ fieldLink: "[`http.request.uri.path`](#httprequesturipath)" }}
510+
/>
496511

497512
**Note:** This raw field may include some basic normalization done by Cloudflare's HTTP server. However, this can change in the future.
498513

499514
## `raw.http.request.uri.path.extension`
500515

501516
`raw.http.request.uri.path.extension` `String`
502517

503-
Similar to the [`http.request.uri.path.extension`](#httprequesturipathextension) non-raw field. Represents the file extension in the request URI path without any transformation.
518+
Represents the raw file extension in the request URI path without any transformation.
519+
520+
<Render
521+
file="raw-fields-definition-with-link"
522+
params={{
523+
fieldLink:
524+
"[`http.request.uri.path.extension`](#httprequesturipathextension)",
525+
}}
526+
/>
504527

505528
## `raw.http.request.uri.query`
506529

507530
`raw.http.request.uri.query` `String`
508531

509-
Similar to the [`http.request.uri.query`](#httprequesturiquery) non-raw field. Represents the entire query string without the `?` delimiter and without any transformation.
532+
Represents the entire query string without the `?` delimiter and without any transformation.
533+
534+
<Render
535+
file="raw-fields-definition-with-link"
536+
params={{ fieldLink: "[`http.request.uri.query`](#httprequesturiquery)" }}
537+
/>
510538

511539
**Note:** This raw field may include some basic normalization done by Cloudflare's HTTP server. However, this can change in the future.
512540

src/content/docs/ruleset-engine/rules-language/fields/uri.mdx

Lines changed: 24 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -8,6 +8,8 @@ head:
88
content: URI argument and value fields | Fields reference
99
---
1010

11+
import { Render } from "~/components";
12+
1113
The Cloudflare Rules language includes URI argument and value fields associated with HTTP requests. Many of these fields return [arrays](/ruleset-engine/rules-language/values/#arrays) containing the respective values.
1214

1315
The Cloudflare Rules language supports these URI argument and value fields.
@@ -75,16 +77,35 @@ Example value:
7577

7678
`raw.http.request.uri.args` `Map<Array<String>>`
7779

78-
Contains the same field values as [`http.request.uri.args`](#httprequesturiargs).
80+
Contains the raw HTTP URI arguments associated with a request as a Map (associative array).
81+
82+
<Render
83+
file="raw-fields-definition-with-link"
84+
params={{ fieldLink: "[`http.request.uri.args`](#httprequesturiargs)" }}
85+
/>
7986

8087
## `raw.http.request.uri.args.names`
8188

8289
`raw.http.request.uri.args.names` `Array<String>`
8390

84-
Contains the same field values as [`http.request.uri.args.names`](#httprequesturiargsnames).
91+
Contains the raw names of the arguments in the HTTP URI query string.
92+
93+
<Render
94+
file="raw-fields-definition-with-link"
95+
params={{
96+
fieldLink: "[`http.request.uri.args.names`](#httprequesturiargsnames)",
97+
}}
98+
/>
8599

86100
## `raw.http.request.uri.args.values`
87101

88102
`raw.http.request.uri.args.values` `Array<String>`
89103

90-
Contains the same field values as [`http.request.uri.args.values`](#httprequesturiargsvalues).
104+
Contains the raw values of arguments in the HTTP URI query string.
105+
106+
<Render
107+
file="raw-fields-definition-with-link"
108+
params={{
109+
fieldLink: "[`http.request.uri.args.values`](#httprequesturiargsvalues)",
110+
}}
111+
/>
Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -0,0 +1,8 @@
1+
---
2+
params:
3+
- fieldLink
4+
---
5+
6+
import { Markdown } from "~/components";
7+
8+
This is the raw field version of the <Markdown text={props.fieldLink}/> field. Raw fields, prefixed with `raw.`, preserve original request 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.

0 commit comments

Comments
 (0)