The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
added preview branch
Steven Teycbb0ffc6154b
diff --git a/middleware.ts b/middleware.tsindex e9582102bd..5b06feb2ca 100644--- a/middleware.ts+++ b/middleware.ts@@ -17,7 +17,10 @@ export default async function middleware(req: NextRequest, ev: NextFetchEvent) {const path = req.nextUrl.pathname;const key = path.split("/")[1];- if (hostname === "dub.sh" && key.length === 0) {+ if (+ (hostname === "dub.sh" || hostname === "preview.dub.sh") &&+ key.length === 0+ ) {return NextResponse.next();} // skip root