Skip to content

Commit 06ac925

Browse files
authored
fix: frontend spa routing (#129)
1 parent c890be2 commit 06ac925

File tree

1 file changed

+8
-0
lines changed
  • infrastructure/modules/cloudfront

1 file changed

+8
-0
lines changed

infrastructure/modules/cloudfront/main.tf

Lines changed: 8 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -82,6 +82,14 @@ resource "aws_cloudfront_distribution" "this" {
8282
ssl_support_method = var.acm_certificate_arn != null ? var.ssl_support_method : null
8383
minimum_protocol_version = var.acm_certificate_arn != null ? var.minimum_protocol_version : null
8484
}
85+
dynamic "custom_error_response" {
86+
for_each = var.distribution_type == "s3" ? [1] : []
87+
content {
88+
error_code = 403
89+
response_code = 200
90+
response_page_path = "/"
91+
}
92+
}
8593

8694
tags = var.tags
8795
}

0 commit comments

Comments
 (0)