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 Teya383957a9a8b
diff --git a/apps/web/lib/edge-config/is-blacklisted-domain.ts b/apps/web/lib/edge-config/is-blacklisted-domain.tsindex f6749768fc..659e8e5597 100644--- a/apps/web/lib/edge-config/is-blacklisted-domain.ts+++ b/apps/web/lib/edge-config/is-blacklisted-domain.ts@@ -18,6 +18,11 @@ 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@@ -31,11 +36,6 @@ export const isBlacklistedDomain = async (return true;}- if (whitelistedDomains.includes(domain)) {- console.log("Domain is whitelisted", domain);- return "whitelisted";- }-return false;} catch (e) {return false;