Skip to content

Commit

Permalink
Update IaC with new cloudfront function (#510)
Browse files Browse the repository at this point in the history
  • Loading branch information
MelissaAutumn authored Jul 3, 2024
1 parent 04f2e23 commit fcd0389
Showing 1 changed file with 6 additions and 0 deletions.
6 changes: 6 additions & 0 deletions tofu/modules/services/frontend-infra/main.tf
Original file line number Diff line number Diff line change
Expand Up @@ -208,6 +208,12 @@ resource "aws_cloudfront_function" "rewrite" {
// If we're not in one of the ignorePaths then force them to /index.html
request.uri = '/index.html';
}
// If empty, then add a slash!
if (request.uri === '') {
request.uri = '/';
}
// else carry on like normal.
return request;
}
Expand Down

0 comments on commit fcd0389

Please sign in to comment.