Skip to content

Commit c955a39

Browse files
authored
Merge pull request #2653 from ankaboot-source/docs/update-readme-features
fix: unsubscribe link in email campaign preview
2 parents 6089089 + 6633ab3 commit c955a39

File tree

2 files changed

+5
-5
lines changed

2 files changed

+5
-5
lines changed

frontend/nuxt.config.ts

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -159,7 +159,7 @@ export default defineNuxtConfig({
159159
'/campaigns',
160160
'/account(/*)?',
161161
],
162-
exclude: ['/auth(/*)?', '/credits-success'],
162+
exclude: ['/auth(/*)?', '/credits-success', '/unsubscribe(/*)?'],
163163
},
164164
},
165165

supabase/functions/email-campaigns/index.ts

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -36,7 +36,7 @@ const PUBLIC_CAMPAIGN_BASE_URL = resolveCampaignBaseUrlFromEnv((key) =>
3636
Deno.env.get(key),
3737
);
3838
const SMTP_USER = normalizeEmail(Deno.env.get("SMTP_USER") || "");
39-
const LEADMINER_FRONTEND_HOST = Deno.env.get("LEADMINER_FRONTEND_HOST") || "";
39+
const FRONTEND_HOST = Deno.env.get("FRONTEND_HOST") || "";
4040
const DEFAULT_SENDER_DAILY_LIMIT = 1000;
4141
const MAX_SENDER_DAILY_LIMIT = 2000;
4242
const PROCESSING_BATCH_SIZE = 300;
@@ -1989,7 +1989,7 @@ app.get("/unsubscribe/:token", async (c: Context) => {
19891989
status: 302,
19901990
headers: {
19911991
...corsHeaders,
1992-
Location: `${LEADMINER_FRONTEND_HOST}/unsubscribe/success?preview=true`,
1992+
Location: `${FRONTEND_HOST}/unsubscribe/success?preview=true`,
19931993
},
19941994
});
19951995
}
@@ -2006,7 +2006,7 @@ app.get("/unsubscribe/:token", async (c: Context) => {
20062006
status: 302,
20072007
headers: {
20082008
...corsHeaders,
2009-
Location: `${LEADMINER_FRONTEND_HOST}/unsubscribe/failure`,
2009+
Location: `${FRONTEND_HOST}/unsubscribe/failure`,
20102010
},
20112011
});
20122012
}
@@ -2039,7 +2039,7 @@ app.get("/unsubscribe/:token", async (c: Context) => {
20392039
status: 302,
20402040
headers: {
20412041
...corsHeaders,
2042-
Location: `${LEADMINER_FRONTEND_HOST}/unsubscribe/success`,
2042+
Location: `${FRONTEND_HOST}/unsubscribe/success`,
20432043
},
20442044
});
20452045
});

0 commit comments

Comments
 (0)