Skip to content

Commit e6489c3

Browse files
committed
Fix: Set index.html content type
* It needs to be set to 'text/html', otherwise it just downloads it as a file ...
1 parent f9d1e08 commit e6489c3

File tree

1 file changed

+4
-3
lines changed

1 file changed

+4
-3
lines changed

s3-static-site.tf

Lines changed: 4 additions & 3 deletions
Original file line numberDiff line numberDiff line change
@@ -66,9 +66,10 @@ resource "aws_s3_bucket_policy" "static_site" {
6666
}
6767

6868
resource "aws_s3_object" "static_site_index" {
69-
bucket = aws_s3_bucket.static_site.id
70-
key = "index.html"
71-
content = local.project_name
69+
bucket = aws_s3_bucket.static_site.id
70+
key = "index.html"
71+
content = local.project_name
72+
content_type = "text/html"
7273

7374
lifecycle {
7475
prevent_destroy = true

0 commit comments

Comments
 (0)