Skip to content
This repository was archived by the owner on Aug 7, 2024. It is now read-only.

Commit b32f24c

Browse files
committed
fix: display home page
1 parent be2117f commit b32f24c

File tree

1 file changed

+6
-2
lines changed

1 file changed

+6
-2
lines changed

middleware.js

+6-2
Original file line numberDiff line numberDiff line change
@@ -7,7 +7,11 @@ export const config = {
77
};
88

99
export async function middleware(req) {
10-
const reqPathName = req.nextUrl.pathname;
10+
const path = req.nextUrl.pathname;
1111

12-
return NextResponse.redirect(new URL(reqPathName, "https://github.com"));
12+
if (path !== "/") {
13+
return NextResponse.redirect(new URL(path, "https://github.com"));
14+
}
15+
16+
return NextResponse.next();
1317
}

0 commit comments

Comments
 (0)