The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
Update is-blacklisted-domain.ts
Steven Tey4f26bba84b19
diff --git a/apps/web/lib/edge-config/is-blacklisted-domain.ts b/apps/web/lib/edge-config/is-blacklisted-domain.tsindex 659e8e5597..f6749768fc 100644--- a/apps/web/lib/edge-config/is-blacklisted-domain.ts+++ b/apps/web/lib/edge-config/is-blacklisted-domain.ts@@ -18,11 +18,6 @@ export const isBlacklistedDomain = async (whitelistedDomains,} = await getAll(["domains", "terms", "whitelistedDomains"]);- if (whitelistedDomains.includes(domain)) {- console.log("Domain is whitelisted", domain);- return "whitelisted";- }-const blacklistedTermsRegex = new RegExp(blacklistedTerms.map((term: string) => term.replace(/[.*+?^${}()|[\]\\]/g, "\\$&")) // replace special characters with escape sequences@@ -36,6 +31,11 @@ export const isBlacklistedDomain = async (return true;}+ if (whitelistedDomains.includes(domain)) {+ console.log("Domain is whitelisted", domain);+ return "whitelisted";+ }+return false;} catch (e) {return false;