Class: AWSCDK::CloudFront::ResponseHeadersContentTypeOptions

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

Overview

Determines whether CloudFront includes the X-Content-Type-Options HTTP response header with its value set to nosniff.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(override:) ⇒ ResponseHeadersContentTypeOptions

Returns a new instance of ResponseHeadersContentTypeOptions.

Parameters:

  • override (Boolean)

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



8
9
10
11
# File 'cloud_front/response_headers_content_type_options.rb', line 8

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

Instance Attribute Details

#overrideBoolean (readonly)

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

Returns:

  • (Boolean)


16
17
18
# File 'cloud_front/response_headers_content_type_options.rb', line 16

def override
  @override
end

Class Method Details

.jsii_propertiesObject



18
19
20
21
22
# File 'cloud_front/response_headers_content_type_options.rb', line 18

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

Instance Method Details

#to_jsiiObject



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

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