Class: Aws::Lightsail::Types::HeaderObject

Inherits:
Struct
  • Object
show all
Defined in:
gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/types.rb

Overview

Note:

When making an API call, you may pass HeaderObject data as a hash:

{
  option: "none", # accepts none, allow-list, all
  headers_allow_list: ["Accept"], # accepts Accept, Accept-Charset, Accept-Datetime, Accept-Encoding, Accept-Language, Authorization, CloudFront-Forwarded-Proto, CloudFront-Is-Desktop-Viewer, CloudFront-Is-Mobile-Viewer, CloudFront-Is-SmartTV-Viewer, CloudFront-Is-Tablet-Viewer, CloudFront-Viewer-Country, Host, Origin, Referer
}

Describes the request headers that a Lightsail distribution bases caching on.

For the headers that you specify, your distribution caches separate versions of the specified content based on the header values in viewer requests. For example, suppose viewer requests for logo.jpg contain a custom product header that has a value of either acme or apex, and you configure your distribution to cache your content based on values in the product header. Your distribution forwards the product header to the origin and caches the response from the origin once for each header value.

Constant Summary collapse

SENSITIVE =
[]

Instance Attribute Summary collapse

Instance Attribute Details

#headers_allow_listArray<String>

The specific headers to forward to your distribution's origin.

Returns:

  • (Array<String>)


7961
7962
7963
7964
7965
7966
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/types.rb', line 7961

class HeaderObject < Struct.new(
  :option,
  :headers_allow_list)
  SENSITIVE = []
  include Aws::Structure
end

#optionString

The headers that you want your distribution to forward to your origin and base caching on.

You can configure your distribution to do one of the following:

  • all - Forward all headers to your origin.

  • none - Forward only the default headers.

  • allow-list - Forward only the headers you specify using the headersAllowList parameter.

Returns:

  • (String)


7961
7962
7963
7964
7965
7966
# File 'gems/aws-sdk-lightsail/lib/aws-sdk-lightsail/types.rb', line 7961

class HeaderObject < Struct.new(
  :option,
  :headers_allow_list)
  SENSITIVE = []
  include Aws::Structure
end