Struct rusoto_cloudfront::Headers [] [src]

pub struct Headers {
    pub items: Option<Vec<String>>,
    pub quantity: i64,
}

A complex type that specifies the headers that you want CloudFront to forward to the origin for this cache behavior.

For the headers that you specify, CloudFront also caches separate versions of a specified object 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 CloudFront to cache your content based on values in the Product header. CloudFront forwards the Product header to the origin and caches the response from the origin once for each header value. For more information about caching based on header values, see How CloudFront Forwards and Caches Headers in the Amazon CloudFront Developer Guide.

Fields

A complex type that contains one Name element for each header that you want CloudFront to forward to the origin and to vary on for this cache behavior. If Quantity is 0, omit Items.

The number of different headers that you want CloudFront to forward to the origin for this cache behavior. You can configure each cache behavior in a web distribution to do one of the following:

  • Forward all headers to your origin: Specify 1 for Quantity and * for Name.

    If you configure CloudFront to forward all headers to your origin, CloudFront doesn't cache the objects associated with this cache behavior. Instead, it sends every request to the origin.

  • Forward a whitelist of headers you specify: Specify the number of headers that you want to forward, and specify the header names in Name elements. CloudFront caches your objects based on the values in all of the specified headers. CloudFront also forwards the headers that it forwards by default, but it caches your objects based only on the headers that you specify.

  • Forward only the default headers: Specify 0 for Quantity and omit Items. In this configuration, CloudFront doesn't cache based on the values in the request headers.

Trait Implementations

impl Default for Headers
[src]

[src]

Returns the "default value" for a type. Read more

impl Debug for Headers
[src]

[src]

Formats the value using the given formatter.