Class: AWSCDK::CloudFront::CfnResponseHeadersPolicy::AccessControlAllowOriginsProperty

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

Overview

A list of origins (domain names) that CloudFront can use as the value for the Access-Control-Allow-Origin HTTP response header.

For more information about the Access-Control-Allow-Origin HTTP response header, see Access-Control-Allow-Origin in the MDN Web Docs.

Instance Attribute Summary collapse

Class Method Summary collapse

Instance Method Summary collapse

Constructor Details

#initialize(items:) ⇒ AccessControlAllowOriginsProperty

Returns a new instance of AccessControlAllowOriginsProperty.

Parameters:

  • items (Array<String>)

    The list of origins (domain names).



609
610
611
612
# File 'cloud_front/cfn_response_headers_policy.rb', line 609

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

Instance Attribute Details

#itemsArray<String> (readonly)

The list of origins (domain names).

You can specify * to allow all origins.



620
621
622
# File 'cloud_front/cfn_response_headers_policy.rb', line 620

def items
  @items
end

Class Method Details

.jsii_propertiesObject



622
623
624
625
626
# File 'cloud_front/cfn_response_headers_policy.rb', line 622

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

Instance Method Details

#to_jsiiObject



628
629
630
631
632
633
634
# File 'cloud_front/cfn_response_headers_policy.rb', line 628

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