diff --git a/src/content/docs/ruleset-engine/rules-language/fields/http-request-body.mdx b/src/content/docs/ruleset-engine/rules-language/fields/http-request-body.mdx index 829bb1294e0bc76..644944a5e658b6e 100644 --- a/src/content/docs/ruleset-engine/rules-language/fields/http-request-body.mdx +++ b/src/content/docs/ruleset-engine/rules-language/fields/http-request-body.mdx @@ -56,7 +56,7 @@ This field may have a value larger than the one returned by `len(http.request.bo ## `http.request.body.form` -`http.request.body.form` `MapString>>` +`http.request.body.form` `Map>` Represents the HTTP request body of a form as a Map (or associative array). Populated when the Content-Type header is `application/x-www-form-urlencoded`. @@ -144,3 +144,81 @@ Example: `image/jpeg` This field is available on all Cloudflare plans. + +## `http.request.body.multipart` + +`http.request.body.multipart` `Map>` + +A Map (or associative array) of multipart names to multipart values in the request body. + +Example value: + +`{"username": ["alice_doe"], "picture": []}` + +## `http.request.body.multipart.names` + +`http.request.body.multipart.names` `Array>` + +List of multipart names for every part in the multipart body. + +Example value: + +`[["username"], ["picture"]]` + +Example: + +`any(http.request.body.multipart.names[*][0] == "picture")` + +## `http.request.body.multipart.values` + +`http.request.body.multipart.values` `Array` + +List of multipart values for every part in the multipart body. + +Example value: + +`["alice_doe", ]` + +## `http.request.body.multipart.content_types` + +`http.request.body.multipart.content_types` `Array>` + +List of `Content-Type` headers for each part in the multipart body. + +Example value: + +`[["text/plain"], ["image/jpeg"]]` + +Example: + +`any(http.request.body.multipart.content_types[*][0] == "application/octet-stream")` + +## `http.request.body.multipart.content_dispositions` + +`http.request.body.multipart.content_dispositions` `Array>` + +List of `Content-Disposition` headers for each part in the multipart body. + +Example value: + +`[["form-data; name=\"username\"], ["form-data;name=\"picture\"]]` + +## `http.request.body.multipart.content_transfer_encodings` + +`http.request.body.multipart.content_transfer_encodings` `Array>` + +List of `Content-Transfer-Encoding` headers for each part in the multipart body. + +Example value: + +`[["quoted-printable"], ["quoted-printable"]]` + +## `http.request.body.multipart.filenames` + +`http.request.body.multipart.filenames` `Array>` + +List of filenames for each part in the multipart body. + +Example value: + +`[["file1.txt"], ["photo.jpg"]]`