aws-cdk-lib.aws_cloudfront.CfnResponseHeadersPolicy.ContentSecurityPolicyProperty

interface ContentSecurityPolicyProperty

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

The policy directives and their values that CloudFront includes as values for the Content-Security-Policy HTTP response header.

For more information about the Content-Security-Policy HTTP response header, see Content-Security-Policy 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 contentSecurityPolicyProperty: cloudfront.CfnResponseHeadersPolicy.ContentSecurityPolicyProperty = {
  contentSecurityPolicy: 'contentSecurityPolicy',
  override: false,
};

Properties

NameTypeDescription
contentSecurityPolicystringThe policy directives and their values that CloudFront includes as values for the Content-Security-Policy HTTP response header.
overrideboolean | IResolvableA Boolean that determines whether CloudFront overrides the Content-Security-Policy HTTP response header received from the origin with the one specified in this response headers policy.

contentSecurityPolicy

Type: string

The policy directives and their values that CloudFront includes as values for the Content-Security-Policy HTTP response header.


override

Type: boolean | IResolvable

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