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.

redirect with full path

Steven Tey74342164c7a2
diff --git a/apps/web/lib/middleware/app.ts b/apps/web/lib/middleware/app.ts
index c97cf762c2..2f2b49b84b 100644
--- a/apps/web/lib/middleware/app.ts
+++ b/apps/web/lib/middleware/app.ts
@@ -43,7 +43,9 @@ export default async function AppMiddleware(req: NextRequest) {
const defaultWorkspace = await getDefaultWorkspace(user);
if (defaultWorkspace) {
- return NextResponse.redirect(new URL(`/${defaultWorkspace}`, req.url));
+ return NextResponse.redirect(
+ new URL(`/${defaultWorkspace}${fullPath}`, req.url),
+ );
} else {
return NextResponse.redirect(new URL("/workspaces", req.url));
}