← 一覧へ

マルチパートのパートヘッダーやプリアンブル、空パートを検査可能に

原題: Inspect multipart part headers, preambles, and empty parts

changelog / Other / Rules / 2026/11/27 09:00 JST

要約

Cloudflare Rulesで、マルチパート形式のリクエストボディをより細かく検査できる5つの新フィールドが追加された。各パートの標準・カスタムヘッダーやヘッダー名・値の一覧、最初の境界より前のプリアンブル、解析時にスキップされた空パートの数が取得できる。たとえば、アップロードされた各パートに付いたカスタムヘッダーの値を条件にしてルールを書ける。ファイルアップロードを扱うサービスのWAFルールが書きやすくなる改善だが、利用にはEnterpriseプランが必要。リクエストボディ検査とマルチパート解析の制限も適用される。

RulesOther 出典サイトのOGP画像 出典サイトで原文を開く →

出典サイトの説明: Inspect standard and custom multipart part headers, bytes before the first boundary, and skipped empty parts in Rules expressions.

Five new Rules fields provide more detail about multipart request bodies: Field Contents http.request.body.multipart.headers Standard and custom headers grouped by lowercase name for each part. http.request.body.multipart.headers.names Header names in original case and occurrence order for each part. http.request.body.multipart.headers.values Header values aligned with the names for each part. http.request.body.multipart.preamble Original bytes before the first boundary delimiter. http.request.body.multipart.empty_parts_count Headerless, empty-body parts skipped during parsing. For example, match a custom header on the first parsed part: http.request.body.multipart.headers[0][“x-upload-tag”][0] eq “review” Header arrays preserve part association and duplicate headers. The preamble includes the line ending before the first delimiter. The empty-part count includes only parts encountered before parsing stops. These fields require an Enterprise plan. Request body inspection and multipart parsing limits apply. For details, refer to the multipart headers , preamble , and empty-part count field references.

出典: 公式ページ

この記事をシェア