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.

added HOME_DOMAIN constant

Steven Tey2dd0e943bd38
diff --git a/lib/constants/index.ts b/lib/constants/index.ts
index 8bb8effed9..6728aa25ff 100644
--- a/lib/constants/index.ts
+++ b/lib/constants/index.ts
@@ -38,6 +38,13 @@ export const HOME_HOSTNAMES = new Set([
"localhost:3000",
]);
+export const HOME_DOMAIN =
+ process.env.NEXT_PUBLIC_VERCEL_ENV === "production"
+ ? "https://dub.sh"
+ : process.env.NEXT_PUBLIC_VERCEL_ENV === "preview"
+ ? (process.env.NEXT_PUBLIC_VERCEL_URL as string)
+ : "http://localhost:3000";
+
export const APP_HOSTNAMES = new Set([
"app.dub.sh",
"app.localhost:3000",