Skip to content
Open
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
40 changes: 39 additions & 1 deletion terraform/releases/impl/cloudfront-doc.tf
Original file line number Diff line number Diff line change
Expand Up @@ -71,7 +71,45 @@ resource "aws_cloudfront_distribution" "doc" {
}

ordered_cache_behavior {
path_pattern = "*.woff2"
path_pattern = "/nightly/static.files/*"
allowed_methods = ["GET", "HEAD", "OPTIONS"]
cached_methods = ["GET", "HEAD", "OPTIONS"]
target_origin_id = "main"

response_headers_policy_id = aws_cloudfront_response_headers_policy.cache_immutable.id
cache_policy_id = data.aws_cloudfront_cache_policy.caching.id

compress = true
viewer_protocol_policy = "redirect-to-https"

lambda_function_association {
event_type = "origin-request"
lambda_arn = module.lambda_doc_router.version_arn
include_body = false
}
}

ordered_cache_behavior {
path_pattern = "/beta/static.files/*"
allowed_methods = ["GET", "HEAD", "OPTIONS"]
cached_methods = ["GET", "HEAD", "OPTIONS"]
target_origin_id = "main"

response_headers_policy_id = aws_cloudfront_response_headers_policy.cache_immutable.id
cache_policy_id = data.aws_cloudfront_cache_policy.caching.id

compress = true
viewer_protocol_policy = "redirect-to-https"

lambda_function_association {
event_type = "origin-request"
lambda_arn = module.lambda_doc_router.version_arn
include_body = false
}
}

ordered_cache_behavior {
path_pattern = "/static.files/*"
allowed_methods = ["GET", "HEAD", "OPTIONS"]
cached_methods = ["GET", "HEAD", "OPTIONS"]
target_origin_id = "main"
Expand Down