diff --git a/src/app/api/redirect/__tests__/route.test.ts b/src/app/api/redirect/__tests__/route.test.ts index 5aa0a033..69ab1629 100644 --- a/src/app/api/redirect/__tests__/route.test.ts +++ b/src/app/api/redirect/__tests__/route.test.ts @@ -156,7 +156,7 @@ describe("redirect route with UTM parameter preservation", () => { expect(location).toContain("affiliate_id=12345"); }); - test("does not preserve params for relative paths (should use middleware)", async () => { + test("does not preserve params for relative paths (should use proxy)", async () => { const searchParams = new URLSearchParams(); searchParams.set("utm_source", "test-source"); @@ -164,7 +164,7 @@ describe("redirect route with UTM parameter preservation", () => { const response = await GET(req); const location = response.headers.get("location"); - // Relative paths should not have params preserved (middleware handles this) + // Relative paths should not have params preserved (proxy handles this) expect(location).toMatch(/^https:\/\/example\.com\/signup$/); expect(location).not.toContain("utm_source"); }); diff --git a/src/app/api/redirect/route.ts b/src/app/api/redirect/route.ts index cc49d539..4b21334f 100644 --- a/src/app/api/redirect/route.ts +++ b/src/app/api/redirect/route.ts @@ -100,7 +100,7 @@ export async function GET(req: Request) { // 2) Preserve query parameters from the redirect request if the destination URL doesn't have them // This allows incoming UTMs and other tracking parameters to be passed through try { - // Only preserve params for absolute URLs (relative paths should use middleware logic) + // Only preserve params for absolute URLs (relative paths should use proxy logic) if (/^https?:/i.test(location)) { const destUrl = new URL(location); const requestParams = url.searchParams; diff --git a/src/components/home/ReactivateCampaignInput.tsx b/src/components/home/ReactivateCampaignInput.tsx index 2dca6a35..13c84679 100644 --- a/src/components/home/ReactivateCampaignInput.tsx +++ b/src/components/home/ReactivateCampaignInput.tsx @@ -611,18 +611,18 @@ export function ReactivateCampaignInput({ {/* Enrich Toggle with Info - on same line when no file, new line when file uploaded */}