File tree Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Expand file tree Collapse file tree 2 files changed +34
-0
lines changed Original file line number Diff line number Diff line change 1+ resource "aws_cloudfront_response_headers_policy" "cache-immutable" {
2+ name = " cache-immutable"
3+
4+ custom_headers_config {
5+ items {
6+ header = " Cache-Control"
7+ override = true
8+ value = " immutable, max-age=9999999"
9+ }
10+ }
11+ }
Original file line number Diff line number Diff line change @@ -49,6 +49,29 @@ resource "aws_cloudfront_distribution" "doc" {
4949 }
5050 }
5151
52+ ordered_cache_behavior {
53+ path_pattern = " *.woff2"
54+ cache_policy_id = " cache-immutable"
55+ allowed_methods = [" GET" , " HEAD" , " OPTIONS" ]
56+ cached_methods = [" GET" , " HEAD" , " OPTIONS" ]
57+ target_origin_id = " main"
58+
59+ forwarded_values {
60+ headers = []
61+ query_string = false
62+
63+ cookies {
64+ forward = " none"
65+ }
66+ }
67+
68+ min_ttl = 0
69+ default_ttl = 86400
70+ max_ttl = 31536000
71+ compress = true
72+ viewer_protocol_policy = " redirect-to-https"
73+ }
74+
5275 origin {
5376 origin_id = " main"
5477 domain_name = aws_s3_bucket. static . website_endpoint
You can’t perform that action at this time.
0 commit comments