We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent 4aecadb commit 5d83d9eCopy full SHA for 5d83d9e
middleware.ts
@@ -33,7 +33,9 @@ export default async function middleware(req: NextRequest) {
33
} else if (session && path == "/login") {
34
return NextResponse.redirect(new URL("/", req.url));
35
}
36
- return NextResponse.rewrite(new URL(`/app${path}`, req.url));
+ return NextResponse.rewrite(
37
+ new URL(`/app${path === "/" ? "" : path}`, req.url)
38
+ );
39
40
41
// rewrite root application to `/home` folder
0 commit comments