Skip to main content

CloudFrontSecurityHeadersSchema

The security headers a response headers policy adds. A null field adds nothing for that header. Every header set here replaces one the origin sent under the same name.

@group

Resources/CloudFrontDistribution

Index

Properties

optionalcontentSecurityPolicy

contentSecurityPolicy?: string | null = null

The value of Content-Security-Policy, verbatim, e.g. default-src 'self'; img-src 'self' https://images.example.com. At most 1783 characters.

optionalcontentTypeOptions

contentTypeOptions?: boolean = true

Whether to send X-Content-Type-Options, which stops a browser from treating a response as a content type other than the one it declares.

optionalframeOptions

frameOptions?: DENY | SAMEORIGIN | null = 'SAMEORIGIN'

The value of X-Frame-Options. See ICloudFrontFrameOption.

optionalreferrerPolicy

referrerPolicy?: no-referrer | no-referrer-when-downgrade | origin | origin-when-cross-origin | same-origin | strict-origin | strict-origin-when-cross-origin | unsafe-url | null = null

The value of Referrer-Policy. See ICloudFrontReferrerPolicy.

optionalstrictTransportSecurityMaxAge

strictTransportSecurityMaxAge?: number | null = 31536000

The max-age of Strict-Transport-Security: how long a browser keeps using HTTPS for this host, in seconds. The header also covers every host below this one, and cannot be added to the lists of HTTPS-only hosts that browsers ship with.