@Stability(value=Stable)
public static interface CfnDistribution.HeaderObjectProperty
extends software.amazon.jsii.JsiiSerializable
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 that viewer requests for logo.jpg contain a custom product header that has a value of either acme or apex. Also, suppose that 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.
Example:
// The code below shows an example of how to instantiate this type.
// The values are placeholders you should change.
import software.amazon.awscdk.services.lightsail.*;
HeaderObjectProperty headerObjectProperty = HeaderObjectProperty.builder()
.headersAllowList(List.of("headersAllowList"))
.option("option")
.build();
| Modifier and Type | Interface and Description |
|---|---|
static class |
CfnDistribution.HeaderObjectProperty.Builder
A builder for
CfnDistribution.HeaderObjectProperty |
static class |
CfnDistribution.HeaderObjectProperty.Jsii$Proxy
An implementation for
CfnDistribution.HeaderObjectProperty |
| Modifier and Type | Method and Description |
|---|---|
static CfnDistribution.HeaderObjectProperty.Builder |
builder() |
default List<String> |
getHeadersAllowList()
The specific headers to forward to your distribution's origin.
|
default String |
getOption()
The headers that you want your distribution to forward to your origin.
|
@Stability(value=Stable) @Nullable default List<String> getHeadersAllowList()
@Stability(value=Stable) @Nullable default String getOption()
Your distribution caches your content based on these headers.
Use one of the following configurations for your distribution:
all - Forwards all headers to your origin..none - Forwards only the default headers.allow-list - Forwards only the headers that you specify using the HeadersAllowList parameter.@Stability(value=Stable) static CfnDistribution.HeaderObjectProperty.Builder builder()
Copyright © 2022. All rights reserved.