interface ContentSecurityPolicyProperty
| Language | Type name |
|---|---|
.NET | Amazon.CDK.Mixins.Preview.AWS.CloudFront.Mixins.CfnResponseHeadersPolicyPropsMixin.ContentSecurityPolicyProperty |
Go | github.com/aws/aws-cdk-go/awscdkmixinspreview/v2/awscloudfront/mixins#CfnResponseHeadersPolicyPropsMixin_ContentSecurityPolicyProperty |
Java | software.amazon.awscdk.mixins.preview.services.cloudfront.mixins.CfnResponseHeadersPolicyPropsMixin.ContentSecurityPolicyProperty |
Python | aws_cdk.mixins_preview.aws_cloudfront.mixins.CfnResponseHeadersPolicyPropsMixin.ContentSecurityPolicyProperty |
TypeScript | @aws-cdk/mixins-preview » aws_cloudfront » mixins » CfnResponseHeadersPolicyPropsMixin » 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 { mixins as cloudfront_mixins } from '@aws-cdk/mixins-preview/aws-cloudfront';
const contentSecurityPolicyProperty: cloudfront_mixins.CfnResponseHeadersPolicyPropsMixin.ContentSecurityPolicyProperty = {
contentSecurityPolicy: 'contentSecurityPolicy',
override: false,
};
Properties
| Name | Type | Description |
|---|---|---|
| content | string | The policy directives and their values that CloudFront includes as values for the Content-Security-Policy HTTP response header. |
| override? | 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. |
contentSecurityPolicy?
Type:
string
(optional)
The policy directives and their values that CloudFront includes as values for the Content-Security-Policy HTTP response header.
override?
Type:
boolean | IResolvable
(optional)
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.

.NET
Go
Java
Python
TypeScript