The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
revert
Steven Tey2362d7cd5ea5
diff --git a/middleware.ts b/middleware.tsindex 111d35cf44..6aa535d2dc 100644--- a/middleware.ts+++ b/middleware.ts@@ -34,6 +34,10 @@ export default async function middleware(req: NextRequest, ev: NextFetchEvent) {const { domain, path, fullPath, key } = parse(req);if (isHomeHostname(domain)) {+ // for docs via Mintlify+ if (fullPath.startsWith("/docs")) {+ return NextResponse.rewrite(`https://dub.mintlify.dev/docs${fullPath}`);+ }return NextResponse.rewrite(new URL(`/dub.co${path === "/" ? "" : path}`, req.url),);diff --git a/vercel.json b/vercel.jsondeleted file mode 100644index ba5d1e5e7e..0000000000--- a/vercel.json+++ /dev/null@@ -1,44 +0,0 @@-{- "rewrites": [- {- "source": "/docs",- "has": [- {- "type": "host",- "value": "dub.co"- }- ],- "destination": "https://dub.mintlify.dev/docs"- },- {- "source": "/docs/:path*",- "has": [- {- "type": "host",- "value": "dub.co"- }- ],- "destination": "https://dub.mintlify.dev/docs/:path*"- },- {- "source": "/docs",- "has": [- {- "type": "host",- "value": "dub-(?<branch>.*)-elegance.vercel.app"- }- ],- "destination": "https://dub.mintlify.dev/docs"- },- {- "source": "/docs/:path*",- "has": [- {- "type": "host",- "value": "dub-(?<branch>.*)-elegance.vercel.app"- }- ],- "destination": "https://dub.mintlify.dev/docs/:path*"- }- ]-}