From b42dc1aec0d640d47d7b79d7afdae208816427ef Mon Sep 17 00:00:00 2001 From: Malini Das Date: Tue, 3 Sep 2024 12:23:37 -0400 Subject: [PATCH] Sitemap (#627) * add super basic sitemap * Move sitemap to public and update infra to ignore it for the redirect. --------- Co-authored-by: Melissa Autumn --- frontend/public/sitemap.txt | 1 + tofu/modules/services/frontend-infra/main.tf | 2 +- 2 files changed, 2 insertions(+), 1 deletion(-) create mode 100644 frontend/public/sitemap.txt diff --git a/frontend/public/sitemap.txt b/frontend/public/sitemap.txt new file mode 100644 index 000000000..2b09faca7 --- /dev/null +++ b/frontend/public/sitemap.txt @@ -0,0 +1 @@ +https://appointment.day/ diff --git a/tofu/modules/services/frontend-infra/main.tf b/tofu/modules/services/frontend-infra/main.tf index 029f12b61..92fce2997 100644 --- a/tofu/modules/services/frontend-infra/main.tf +++ b/tofu/modules/services/frontend-infra/main.tf @@ -198,7 +198,7 @@ resource "aws_cloudfront_function" "rewrite" { async function handler(event) { const request = event.request; const apiPath = "/api/v1"; - const ignorePaths = ['/fxa', '/assets', '/appointment_logo.svg']; + const ignorePaths = ['/fxa', '/assets', '/appointment_logo.svg', '/sitemap.txt']; const pathCheckFn = (path) => request.uri.startsWith(path); // If our api path is the first thing that's found in the uri then remove it from the uri.