aws-cdk-lib.aws_cloudfront.CfnResponseHeadersPolicy.StrictTransportSecurityProperty

interface StrictTransportSecurityProperty

LanguageType name
.NETAmazon.CDK.AWS.CloudFront.CfnResponseHeadersPolicy.StrictTransportSecurityProperty
Gogithub.com/aws/aws-cdk-go/awscdk/v2/awscloudfront#CfnResponseHeadersPolicy_StrictTransportSecurityProperty
Javasoftware.amazon.awscdk.services.cloudfront.CfnResponseHeadersPolicy.StrictTransportSecurityProperty
Pythonaws_cdk.aws_cloudfront.CfnResponseHeadersPolicy.StrictTransportSecurityProperty
TypeScript aws-cdk-lib » aws_cloudfront » CfnResponseHeadersPolicy » StrictTransportSecurityProperty

Determines whether CloudFront includes the Strict-Transport-Security HTTP response header and the header's value.

For more information about the Strict-Transport-Security HTTP response header, see Strict-Transport-Security in the MDN Web Docs.

Example

// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import { aws_cloudfront as cloudfront } from 'aws-cdk-lib';
const strictTransportSecurityProperty: cloudfront.CfnResponseHeadersPolicy.StrictTransportSecurityProperty = {
  accessControlMaxAgeSec: 123,
  override: false,

  // the properties below are optional
  includeSubdomains: false,
  preload: false,
};

Properties

NameTypeDescription
accessControlMaxAgeSecnumberA number that CloudFront uses as the value for the max-age directive in the Strict-Transport-Security HTTP response header.
overrideboolean | IResolvableA Boolean that determines whether CloudFront overrides the Strict-Transport-Security HTTP response header received from the origin with the one specified in this response headers policy.
includeSubdomains?boolean | IResolvableA Boolean that determines whether CloudFront includes the includeSubDomains directive in the Strict-Transport-Security HTTP response header.
preload?boolean | IResolvableA Boolean that determines whether CloudFront includes the preload directive in the Strict-Transport-Security HTTP response header.

accessControlMaxAgeSec

Type: number

A number that CloudFront uses as the value for the max-age directive in the Strict-Transport-Security HTTP response header.


override

Type: boolean | IResolvable

A Boolean that determines whether CloudFront overrides the Strict-Transport-Security HTTP response header received from the origin with the one specified in this response headers policy.


includeSubdomains?

Type: boolean | IResolvable (optional)

A Boolean that determines whether CloudFront includes the includeSubDomains directive in the Strict-Transport-Security HTTP response header.


preload?

Type: boolean | IResolvable (optional)

A Boolean that determines whether CloudFront includes the preload directive in the Strict-Transport-Security HTTP response header.