Class: AWSCDK::CloudFront::ResponseHeadersContentSecurityPolicy
- Inherits:
-
Jsii::Struct
- Object
- Jsii::Struct
- AWSCDK::CloudFront::ResponseHeadersContentSecurityPolicy
- Defined in:
- cloud_front/response_headers_content_security_policy.rb
Overview
The policy directives and their values that CloudFront includes as values for the Content-Security-Policy HTTP response header.
Instance Attribute Summary collapse
-
#content_security_policy ⇒ String
readonly
The policy directives and their values that CloudFront includes as values for the Content-Security-Policy HTTP response header.
-
#override ⇒ Boolean
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.
Class Method Summary collapse
Instance Method Summary collapse
-
#initialize(content_security_policy:, override:) ⇒ ResponseHeadersContentSecurityPolicy
constructor
A new instance of ResponseHeadersContentSecurityPolicy.
- #to_jsii ⇒ Object
Constructor Details
#initialize(content_security_policy:, override:) ⇒ ResponseHeadersContentSecurityPolicy
Returns a new instance of ResponseHeadersContentSecurityPolicy.
9 10 11 12 13 14 |
# File 'cloud_front/response_headers_content_security_policy.rb', line 9 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("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "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.
19 20 21 |
# File 'cloud_front/response_headers_content_security_policy.rb', line 19 def content_security_policy @content_security_policy end |
#override ⇒ Boolean (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.
23 24 25 |
# File 'cloud_front/response_headers_content_security_policy.rb', line 23 def override @override end |
Class Method Details
.jsii_properties ⇒ Object
25 26 27 28 29 30 |
# File 'cloud_front/response_headers_content_security_policy.rb', line 25 def self.jsii_properties { :content_security_policy => "contentSecurityPolicy", :override => "override", } end |
Instance Method Details
#to_jsii ⇒ Object
32 33 34 35 36 37 38 39 |
# File 'cloud_front/response_headers_content_security_policy.rb', line 32 def to_jsii result = {} result.merge!({ "contentSecurityPolicy" => @content_security_policy, "override" => @override, }) result.compact end |