Skip to content

armgit / dub

Public Imported from GitHub
0

The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.

fix domains

Steven Tey656dc4705583
diff --git a/apps/web/lib/api/domains.ts b/apps/web/lib/api/domains.ts
index 8ce35d8c1f..3e007f07c4 100644
--- a/apps/web/lib/api/domains.ts
+++ b/apps/web/lib/api/domains.ts
@@ -15,8 +15,10 @@ export const validateDomain = async (domain: string) => {
}
const validDomain =
validDomainRegex.test(domain) &&
- // make sure the domain doesn't contain dub.co/dub.sh
- !/^(dub\.co|.*\.dub\.co|dub\.sh|.*\.dub\.sh)$/i.test(domain);
+ // make sure the domain doesn't contain dub.co/dub.sh/d.to
+ !/^(dub\.co|.*\.dub\.co|dub\.sh|.*\.dub\.sh|d\.to|.*\.d\.to)$/i.test(
+ domain,
+ );
if (!validDomain) {
return "Invalid domain";