gpt4 book ai didi

amazon-web-services - CloudFront ForwardedValues 不明确的文档

转载 作者:行者123 更新时间:2023-12-05 02:56:39 30 4
gpt4 key购买 nike

我正在使用 CloudFormation 配置我的 CloudFront,并在 the AWS documentation page for the ForwardedValues property 上,我们可以看到如下语句:

If you specify true for QueryString and you don't specify any values for QueryStringCacheKeys, CloudFront forwards all query string parameters to the origin and caches based on all query string parameters.

粗体字(caches)引起了一些困惑,因为这句话的含义完全取决于caches是动词还是caches 作为名词:

  • 动词:CloudFormation 将缓存查询参数
  • 名词:CloudFormation 会将查询参数转发到缓存,但不会缓存查询参数

如果我不指定QueryStringCacheKeys ,CloudFront 的行为是什么?

最佳答案

我通过指定 CachePolicyId 修复了该问题

https://docs.aws.amazon.com/AmazonCloudFront/latest/DeveloperGuide/using-managed-cache-policies.html 所示

    Type: "AWS::CloudFront::Distribution"
Properties:
DistributionConfig:
DefaultCacheBehavior:
# Name: Managed-CachingOptimized
# need either this parameter or 'ForwardedValues'
CachePolicyId: 658327ea-f89d-4fab-a63d-7e88639e58f6

关于amazon-web-services - CloudFront ForwardedValues 不明确的文档,我们在Stack Overflow上找到一个类似的问题: https://stackoverflow.com/questions/60224748/

30 4 0
Copyright 2021 - 2024 cfsdn All Rights Reserved 蜀ICP备2022000587号
广告合作:1813099741@qq.com 6ren.com