From 77d9a8ea66dcff59dfb1afb3f0574b16af1b8989 Mon Sep 17 00:00:00 2001 From: Colin Saliceti Date: Tue, 2 Jul 2024 11:54:26 +0100 Subject: [PATCH] Redirect apex to www canonical domain The redirect is set up using front door instead of the ruby code --- .../environment_domains/config/production.tfvars.json | 6 +++++- terraform/domains/environment_domains/main.tf | 1 + 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/terraform/domains/environment_domains/config/production.tfvars.json b/terraform/domains/environment_domains/config/production.tfvars.json index 523c65e21e..b752b31c6d 100644 --- a/terraform/domains/environment_domains/config/production.tfvars.json +++ b/terraform/domains/environment_domains/config/production.tfvars.json @@ -11,7 +11,11 @@ "/assets/*" ], "environment_short": "pd", - "origin_hostname": "s118p01-app-as.azurewebsites.net" + "origin_hostname": "s118p01-app-as.azurewebsites.net", + "redirect_rules": [{ + "from-domain": "apex", + "to-domain": "www.claim-additional-teaching-payment.service.gov.uk" + }] } } } diff --git a/terraform/domains/environment_domains/main.tf b/terraform/domains/environment_domains/main.tf index 50aacc8386..c1409765d8 100644 --- a/terraform/domains/environment_domains/main.tf +++ b/terraform/domains/environment_domains/main.tf @@ -9,4 +9,5 @@ module "domains" { environment = each.value.environment_short host_name = each.value.origin_hostname cached_paths = try(each.value.cached_paths, []) + redirect_rules = try(each.value.redirect_rules, null) }