Class: AWSCDK::CloudFront::CfnResponseHeadersPolicy::ReferrerPolicyProperty

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

Overview

Determines whether CloudFront includes the Referrer-Policy HTTP response header and the header's value.

For more information about the Referrer-Policy HTTP response header, see Referrer-Policy in the MDN Web Docs.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(override:, referrer_policy:) ⇒ ReferrerPolicyProperty

Returns a new instance of ReferrerPolicyProperty.

Parameters:

  • override (Boolean, AWSCDK::IResolvable)

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

  • referrer_policy (String)

    The value of the Referrer-Policy HTTP response header. Valid values are:.



1010
1011
1012
1013
1014
1015
# File 'cloud_front/cfn_response_headers_policy.rb', line 1010

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

Instance Attribute Details

#overrideBoolean, AWSCDK::IResolvable (readonly)

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



1021
1022
1023
# File 'cloud_front/cfn_response_headers_policy.rb', line 1021

def override
  @override
end

#referrer_policyString (readonly)

The value of the Referrer-Policy HTTP response header. Valid values are:.

  • no-referrer
  • no-referrer-when-downgrade
  • origin
  • origin-when-cross-origin
  • same-origin
  • strict-origin
  • strict-origin-when-cross-origin
  • unsafe-url

For more information about these values, see Referrer-Policy in the MDN Web Docs.



1037
1038
1039
# File 'cloud_front/cfn_response_headers_policy.rb', line 1037

def referrer_policy
  @referrer_policy
end

Class Method Details

.jsii_propertiesObject



1039
1040
1041
1042
1043
1044
# File 'cloud_front/cfn_response_headers_policy.rb', line 1039

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

Instance Method Details

#to_jsiiObject



1046
1047
1048
1049
1050
1051
1052
1053
# File 'cloud_front/cfn_response_headers_policy.rb', line 1046

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