Skip to content

Commit 1c2168f

Browse files
author
bbrauneck
committed
fix: disabled caching behaviour if caching is disabled
1 parent 59f54ea commit 1c2168f

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

main.tf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -28,7 +28,7 @@ resource "aws_cloudfront_cache_policy" "this" {
2828
enable_accept_encoding_gzip = true
2929
enable_accept_encoding_brotli = true
3030
cookies_config {
31-
cookie_behavior = "all"
31+
cookie_behavior = var.cf_max_ttl == 0 ? "none" : "all"
3232
}
3333
headers_config {
3434
header_behavior = "none"

0 commit comments

Comments
 (0)