diff --git a/terraform/web.tf b/terraform/web.tf index a2be36ab..4233027f 100644 --- a/terraform/web.tf +++ b/terraform/web.tf @@ -227,13 +227,8 @@ module "cdn" { custom_error_response = [ { error_code = 404 - response_code = 404 - response_page_path = "/errors/404.html" - }, - { - error_code = 403 - response_code = 403 - response_page_path = "/errors/403.html" + response_code = 200 + response_page_path = "/index.html" }, ] @@ -264,6 +259,9 @@ module "cdn" { compress = true cache_policy_id = data.aws_cloudfront_cache_policy.Managed-CachingOptimized.id use_forwarded_values = false + + // See https://github.com/aws-samples/amazon-cloudfront-functions/tree/main/url-rewrite-single-page-apps + function_association = {} } ordered_cache_behavior = [