File tree Expand file tree Collapse file tree 1 file changed +3
-13
lines changed
infrastructure/terraform/components/app Expand file tree Collapse file tree 1 file changed +3
-13
lines changed Original file line number Diff line number Diff line change @@ -62,7 +62,7 @@ resource "aws_cloudfront_distribution" "main" {
6262 viewer_protocol_policy = " redirect-to-https"
6363 compress = true
6464
65- cache_policy_id = aws_cloudfront_cache_policy. no_cache . id
65+ cache_policy_id = data . aws_cloudfront_cache_policy . caching_disabled . id
6666 origin_request_policy_id = aws_cloudfront_origin_request_policy. forward_cookies . id
6767
6868
@@ -73,18 +73,8 @@ resource "aws_cloudfront_distribution" "main" {
7373 }
7474}
7575
76- resource "aws_cloudfront_cache_policy" "no_cache" {
77- name = " ${ local . csi } -no-cache-policy"
78-
79- default_ttl = 0
80- max_ttl = 0
81- min_ttl = 0
82-
83- parameters_in_cache_key_and_forwarded_to_origin {
84- cookies_config { cookie_behavior = " none" }
85- headers_config { header_behavior = " none" }
86- query_strings_config { query_string_behavior = " none" }
87- }
76+ data "aws_cloudfront_cache_policy" "caching_disabled" {
77+ name = " Managed-CachingDisabled"
8878}
8979
9080resource "aws_cloudfront_origin_request_policy" "forward_cookies" {
You can’t perform that action at this time.
0 commit comments