Class: AWSCDK::CloudFront::CfnResponseHeadersPolicy::ContentTypeOptionsProperty

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

Overview

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

For more information about the X-Content-Type-Options HTTP response header, see X-Content-Type-Options in the MDN Web Docs.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(override:) ⇒ ContentTypeOptionsProperty

Returns a new instance of ContentTypeOptionsProperty.

Parameters:

  • override (Boolean, AWSCDK::IResolvable)

    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.



728
729
730
731
# File 'cloud_front/cfn_response_headers_policy.rb', line 728

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

Instance Attribute Details

#overrideBoolean, AWSCDK::IResolvable (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.



737
738
739
# File 'cloud_front/cfn_response_headers_policy.rb', line 737

def override
  @override
end

Class Method Details

.jsii_propertiesObject



739
740
741
742
743
# File 'cloud_front/cfn_response_headers_policy.rb', line 739

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

Instance Method Details

#to_jsiiObject



745
746
747
748
749
750
751
# File 'cloud_front/cfn_response_headers_policy.rb', line 745

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