OriginRequestHeaderBehavior

class aws_cdk.aws_cloudfront.OriginRequestHeaderBehavior(*args, **kwargs)

Bases: object

(experimental) Determines whether any HTTP headers (and if so, which headers) are included in requests that CloudFront sends to the origin.

Stability

experimental

Attributes

behavior

allow all, none or an allow list.

Stability

experimental

Type

(experimental) The behavior of headers

Return type

str

headers

(experimental) The headers for the allow list or the included CloudFront headers, if applicable.

Stability

experimental

Return type

Optional[List[str]]

Static Methods

classmethod all(*cloudfront_headers)

(experimental) All HTTP headers in viewer requests are included in requests that CloudFront sends to the origin.

Additionally, any additional CloudFront headers provided are included; the additional headers are added by CloudFront.

Parameters

cloudfront_headers (str) –

See

https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-cloudfront-headers.html

Stability

experimental

Return type

OriginRequestHeaderBehavior

classmethod allow_list(*headers)

(experimental) Listed headers are included in requests that CloudFront sends to the origin.

Parameters

headers (str) –

Stability

experimental

Return type

OriginRequestHeaderBehavior

classmethod none()

(experimental) HTTP headers are not included in requests that CloudFront sends to the origin.

Any headers that are listed in a CachePolicy are still included in origin requests.

Stability

experimental

Return type

OriginRequestHeaderBehavior