diff --git a/tofu/modules/services/frontend-infra/main.tf b/tofu/modules/services/frontend-infra/main.tf index edd852e0d..bc12b404a 100644 --- a/tofu/modules/services/frontend-infra/main.tf +++ b/tofu/modules/services/frontend-infra/main.tf @@ -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; }