Class: AWSCDK::CloudFront::ResponseHeadersFrameOptions

Inherits:
Jsii::Struct
  • Object
show all
Defined in:
cloud_front/response_headers_frame_options.rb

Overview

Determines whether CloudFront includes the X-Frame-Options HTTP response header and the header’s value.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(frame_option:, override:) ⇒ ResponseHeadersFrameOptions

Returns a new instance of ResponseHeadersFrameOptions.

Parameters:

  • frame_option (AWSCDK::CloudFront::HeadersFrameOption)

    The value of the X-Frame-Options HTTP response header.

  • override (Boolean)

    A Boolean that determines whether CloudFront overrides the X-Frame-Options HTTP response header received from the origin with the one specified in this response headers policy.



9
10
11
12
13
14
# File 'cloud_front/response_headers_frame_options.rb', line 9

def initialize(frame_option:, override:)
  @frame_option = frame_option
  Jsii::Type.check_type(@frame_option, JSON.parse(Base64.strict_decode64("eyJmcW4iOiJhd3MtY2RrLWxpYi5hd3NfY2xvdWRmcm9udC5IZWFkZXJzRnJhbWVPcHRpb24ifQ==")), "frameOption")
  @override = override
  Jsii::Type.check_type(@override, JSON.parse(Base64.strict_decode64("eyJwcmltaXRpdmUiOiJib29sZWFuIn0=")), "override")
end

Instance Attribute Details

#frame_optionAWSCDK::CloudFront::HeadersFrameOption (readonly)

The value of the X-Frame-Options HTTP response header.



19
20
21
# File 'cloud_front/response_headers_frame_options.rb', line 19

def frame_option
  @frame_option
end

#overrideBoolean (readonly)

A Boolean that determines whether CloudFront overrides the X-Frame-Options HTTP response header received from the origin with the one specified in this response headers policy.

Returns:

  • (Boolean)


23
24
25
# File 'cloud_front/response_headers_frame_options.rb', line 23

def override
  @override
end

Class Method Details

.jsii_propertiesObject



25
26
27
28
29
30
# File 'cloud_front/response_headers_frame_options.rb', line 25

def self.jsii_properties
  {
    :frame_option => "frameOption",
    :override => "override",
  }
end

Instance Method Details

#to_jsiiObject



32
33
34
35
36
37
38
39
# File 'cloud_front/response_headers_frame_options.rb', line 32

def to_jsii
  result = {}
  result.merge!({
    "frameOption" => @frame_option,
    "override" => @override,
  })
  result.compact
end