aws_cloudfront_distribution forwarded_values (Terraform) 中 headers 的语法是什么?
What is the syntax for headers in aws_cloudfront_distribution forwarded_values (Terraform)?
doc 没有显示示例,所以我不清楚。应该怎样才合适?
resource "aws_cloudfront_distribution" "this" {
...
default_cache_behavior {
max_ttl = 86400
forwarded_values {
# which option?
headers = ["Cache-Control max-age"]
headers = ["Cache-Control: max-age"]
headers = ["Cache-Control-max-age"]
headers = ["something else?"]
....
header Cache-Control: max-age=86400
具有键:Cache-Control
和值:max-age=86400
。您只需使用名称 Cache-Control
,无需 max-age
部分。
doc 没有显示示例,所以我不清楚。应该怎样才合适?
resource "aws_cloudfront_distribution" "this" {
...
default_cache_behavior {
max_ttl = 86400
forwarded_values {
# which option?
headers = ["Cache-Control max-age"]
headers = ["Cache-Control: max-age"]
headers = ["Cache-Control-max-age"]
headers = ["something else?"]
....
header Cache-Control: max-age=86400
具有键:Cache-Control
和值:max-age=86400
。您只需使用名称 Cache-Control
,无需 max-age
部分。