Skip to content
v2.277.0

CustomHTTPHeaderProperty Struct ​

A custom header for custom request and response handling.

This is used in CustomResponse and CustomRequestHandling .

Example ​

ts
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_wafv2 as wafv2 } from 'aws-cdk-lib';
const customHTTPHeaderProperty: wafv2.CfnWebACL.CustomHTTPHeaderProperty = {
  name: 'name',
  value: 'value',
};
python
# The code below shows an example of how to instantiate this type.
# The values are placeholders you should change.
from aws_cdk import aws_wafv2 as wafv2

custom_http_header_property = wafv2.CfnWebACL.CustomHTTPHeaderProperty(
    name="name",
    value="value"
)
java
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.wafv2.*;

CustomHTTPHeaderProperty customHTTPHeaderProperty = CustomHTTPHeaderProperty.builder()
        .name("name")
        .value("value")
        .build();
csharp
// Install: dotnet add package Amazon.CDK.Lib
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
using Amazon.CDK.AWS.WAFv2;

var customHTTPHeaderProperty = new CustomHTTPHeaderProperty {
    Name = "name",
    Value = "value"
};
go
// Install: go get github.com/aws/aws-cdk-go/awscdk/v2
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import "github.com/aws/aws-cdk-go/awscdk"

customHTTPHeaderProperty := &CustomHTTPHeaderProperty{
	Name: jsii.String("name"),
	Value: jsii.String("value"),
}

Properties ​

namestringnamestrnameStringNamestringName*stringrequired#
The name of the custom header.
notes

For custom request header insertion, when AWS WAF inserts the header into the request, it prefixes this name x-amzn-waf- , to avoid confusion with the headers that are already in the request. For example, for the header name sample , AWS WAF inserts the header x-amzn-waf-sample .

valuestringvaluestrvalueStringValuestringValue*stringrequired#
The value of the custom header.