Skip to content

Commit

Permalink
fix: display home page
Browse files Browse the repository at this point in the history
  • Loading branch information
eddiejaoude committed Jun 10, 2024
1 parent be2117f commit b32f24c
Showing 1 changed file with 6 additions and 2 deletions.
8 changes: 6 additions & 2 deletions middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -7,7 +7,11 @@ export const config = {
};

export async function middleware(req) {
const reqPathName = req.nextUrl.pathname;
const path = req.nextUrl.pathname;

return NextResponse.redirect(new URL(reqPathName, "https://github.com"));
if (path !== "/") {
return NextResponse.redirect(new URL(path, "https://github.com"));
}

return NextResponse.next();
}

0 comments on commit b32f24c

Please sign in to comment.