如何使用 CloudFormation 配置 CloudFront 以将 'ForwardedValues' 中的 'Headers' 属性 设置为 'all'?

How to configure CloudFront using CloudFormation to set the 'Headers' property in 'ForwardedValues' to 'all'?

我正在使用 CloudFormation 设置 CloudFront,但我需要配置 Headers property of the ForwardedValues 属性。它应该以 all headers 被转发的方式设置。

我在 ForwardedValues documentation page nor the page that is linked regarding Caching Content Based on Request Headers 上都找不到如何操作。

这是 CloudFormation 'path' 到 Header 属性:

someCloudFrontDistributionName:
    Type: AWS::CloudFront::Distribution
    Properties:
        CacheBehaviors:
            ForwaredValues:
                Headers:
                - # What to put here that will allow all Headers to be forwarded?

这是我在 getdistrinbution 配置中看到的:

"ForwardedValues": { "Headers": { "Items": [ "*" ]

你可以试试看是否有效

使用 Yaml:

    Headers: ["*"]

"ForwardedValues" 元素中某些上下文的示例:

    ForwardedValues:
        Cookies:
          Forward: all
        Headers: ["*"]
        QueryString: true

请注意,由于 "Date" headers 的缓存,这可能会导致性能不佳(据称) [here]