Skip to content

Commit 5d83d9e

Browse files
committed
workaround
1 parent 4aecadb commit 5d83d9e

File tree

1 file changed

+3
-1
lines changed

1 file changed

+3
-1
lines changed

middleware.ts

Lines changed: 3 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -33,7 +33,9 @@ export default async function middleware(req: NextRequest) {
3333
} else if (session && path == "/login") {
3434
return NextResponse.redirect(new URL("/", req.url));
3535
}
36-
return NextResponse.rewrite(new URL(`/app${path}`, req.url));
36+
return NextResponse.rewrite(
37+
new URL(`/app${path === "/" ? "" : path}`, req.url)
38+
);
3739
}
3840

3941
// rewrite root application to `/home` folder

0 commit comments

Comments
 (0)