From 1c2168f774c729a93400bce93e3e6af15808ce1d Mon Sep 17 00:00:00 2001 From: bbrauneck Date: Thu, 23 Jun 2022 13:35:38 +0200 Subject: [PATCH] fix: disabled caching behaviour if caching is disabled --- main.tf | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/main.tf b/main.tf index c288935..6d6783f 100644 --- a/main.tf +++ b/main.tf @@ -28,7 +28,7 @@ resource "aws_cloudfront_cache_policy" "this" { enable_accept_encoding_gzip = true enable_accept_encoding_brotli = true cookies_config { - cookie_behavior = "all" + cookie_behavior = var.cf_max_ttl == 0 ? "none" : "all" } headers_config { header_behavior = "none"