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.

Include Vercel preview links as home hostname

Steven Teyee9bc041f526
diff --git a/middleware.ts b/middleware.ts
index 200c8f5263..1324986007 100644
--- a/middleware.ts
+++ b/middleware.ts
@@ -26,7 +26,7 @@ export const config = {
export default async function middleware(req: NextRequest, ev: NextFetchEvent) {
const { domain, path, key } = parse(req);
- const home = domain === "dub.sh";
+ const home = domain === "dub.sh" || domain.endsWith(".vercel.app");
// for App (app.dub.sh and app.localhost:3000)
if (domain === "app.dub.sh" || domain === "app.localhost:3000") {