From f317f1abc220c0054a5b3cc3d658940889d84807 Mon Sep 17 00:00:00 2001 From: Evan Pratten Date: Wed, 24 May 2023 19:25:03 -0400 Subject: [PATCH] Fix order --- static/functions/_middleware.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/static/functions/_middleware.js b/static/functions/_middleware.js index 8e2b69a..315275b 100644 --- a/static/functions/_middleware.js +++ b/static/functions/_middleware.js @@ -5,10 +5,10 @@ async function redirect_secondary_domains(context) { // If the request is for any of the secondary domains, redirect to the primary domain var secondary_domains = ['test.ewp.fyi', 'evan.pratten.ca', 'evan.warren.pratten.ca']; if (secondary_domains.includes(url.hostname)) { - url.hostname = 'ewpratten.com'; url.searchParams.set("utm_source", url.hostname); url.searchParams.set("utm_medium", "redirect"); url.searchParams.set("utm_campaign", "secondary_domains"); + url.hostname = 'ewpratten.com'; return Response.redirect(url, 302); }