AWS::WAFv2::WebACL HeaderMatchPattern - AWS CloudFormation

AWS::WAFv2::WebACL HeaderMatchPattern

The filter to use to identify the subset of headers to inspect in a web request.

You must specify exactly one setting: either All, IncludedHeaders, or ExcludedHeaders.

Example JSON: "MatchPattern": { "ExcludedHeaders": [ "KeyToExclude1", "KeyToExclude2" ] }

Syntax

To declare this entity in your AWS CloudFormation template, use the following syntax:

JSON

{ "All" : Json, "ExcludedHeaders" : [ String, ... ], "IncludedHeaders" : [ String, ... ] }

YAML

All: Json ExcludedHeaders: - String IncludedHeaders: - String

Properties

All

Inspect all headers.

Required: No

Type: Json

Update requires: No interruption

ExcludedHeaders

Inspect only the headers whose keys don't match any of the strings specified here.

Required: No

Type: Array of String

Minimum: 1 | 1

Maximum: 64 | 199

Update requires: No interruption

IncludedHeaders

Inspect only the headers that have a key that matches one of the strings specified here.

Required: No

Type: Array of String

Minimum: 1 | 1

Maximum: 64 | 199

Update requires: No interruption

Examples

Set a header match pattern for all paths

The following shows an example header match pattern specification for all paths.

YAML

MatchPattern: All: {}

JSON

"MatchPattern": { "All": {} }

Set a header match pattern with included paths

The following shows an example header match pattern specification with included paths.

YAML

MatchPattern: IncludedHeaders: - "User-Agent" - "Referer"

JSON

"MatchPattern": { "IncludedHeaders": [ "User-Agent", "Referer" ] }