The modern link attribution platform. Loved by world-class engineering teams at Twilio, Zillow, Jobber, Vercel, Raycast, and more.
TypeScript clickhousemysqlnextjsopen-sourceplanetscaleprismatailwindcsstinybirdtypescriptupstashvercel
small middleware fix
Steven Tey0efaafb58c7e
diff --git a/lib/middleware/app.ts b/lib/middleware/app.tsindex 8194e5ab1b..6a4383e827 100644--- a/lib/middleware/app.ts+++ b/lib/middleware/app.ts@@ -16,7 +16,7 @@ export default async function AppMiddleware(req: NextRequest) {if (!session?.email && path !== "/login" && path !== "/register") {return NextResponse.redirect(new URL(- `/login?next=${encodeURIComponent(new URL(req.url).pathname)}`,+ `/login${path !== "/" ? `?next=${encodeURIComponent(path)}` : ""}`,req.url,),);