Class: AWSCDK::CloudFront::CfnResponseHeadersPolicy::ContentSecurityPolicyProperty
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CloudFront::CfnResponseHeadersPolicy::ContentSecurityPolicyProperty
- Defined in:
- cloud_front/cfn_response_headers_policy.rb
Overview
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.
Instance Attribute Summary collapse
-
#content_security_policy ⇒ String
readonly
The policy directives and their values that CloudFront includes as values for the
Content-Security-PolicyHTTP response header. -
#override ⇒ Boolean, AWSCDK::IResolvable
readonly
A Boolean that determines whether CloudFront overrides the
Content-Security-PolicyHTTP response header received from the origin with the one specified in this response headers policy.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(content_security_policy:, override:) ⇒ ContentSecurityPolicyProperty
constructor
A new instance of ContentSecurityPolicyProperty.
- #to_jsii ⇒ Object
Constructor Details
#initialize(content_security_policy:, override:) ⇒ ContentSecurityPolicyProperty
Returns a new instance of ContentSecurityPolicyProperty.
684 685 686 687 688 689 |
# File 'cloud_front/cfn_response_headers_policy.rb', line 684 def initialize(content_security_policy:, override:) @content_security_policy = content_security_policy Jsii::Type.check_type(@content_security_policy, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJzdHJpbmcifQ==")), "contentSecurityPolicy") @override = override Jsii::Type.check_type(@override, JSON.parse(Base64.strict_decode64("eyJ1bmlvbiI6eyJ0eXBlcyI6W3sicHJpbWl0aXZlIjoiYm9vbGVhbiJ9LHsiZnFuIjoiYXdzLWNkay1saWIuSVJlc29sdmFibGUifV19fQ==")), "override") end |
Instance Attribute Details
#content_security_policy ⇒ String (readonly)
The policy directives and their values that CloudFront includes as values for the Content-Security-Policy HTTP response header.
695 696 697 |
# File 'cloud_front/cfn_response_headers_policy.rb', line 695 def content_security_policy @content_security_policy end |
#override ⇒ Boolean, AWSCDK::IResolvable (readonly)
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.
700 701 702 |
# File 'cloud_front/cfn_response_headers_policy.rb', line 700 def override @override end |
Class Method Details
.jsii_properties ⇒ Object
702 703 704 705 706 707 |
# File 'cloud_front/cfn_response_headers_policy.rb', line 702 def self.jsii_properties { :content_security_policy => "contentSecurityPolicy", :override => "override", } end |
Instance Method Details
#to_jsii ⇒ Object
709 710 711 712 713 714 715 716 |
# File 'cloud_front/cfn_response_headers_policy.rb', line 709 def to_jsii result = {} result.merge!({ "contentSecurityPolicy" => @content_security_policy, "override" => @override, }) result.compact end |