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

Commit 5ca8158

Browse files
committed
fix: check for username first
1 parent a1f5fe7 commit 5ca8158

1 file changed

Lines changed: 4 additions & 4 deletions

File tree

src/middleware.js

Lines changed: 4 additions & 4 deletions
Original file line numberDiff line numberDiff line change
@@ -9,15 +9,15 @@ export const config = {
99
export async function middleware(req) {
1010
const path = req.nextUrl.pathname;
1111

12+
if (path !== "/") {
13+
return NextResponse.redirect(new URL(path, "https://github.com"));
14+
}
15+
1216
if (path === "/") {
1317
return NextResponse.redirect(
1418
new URL("/EddieHubCommunity/BioDrop", "https://github.com")
1519
);
1620
}
1721

18-
if (path !== "/") {
19-
return NextResponse.redirect(new URL(path, "https://github.com"));
20-
}
21-
2222
return NextResponse.next();
2323
}

0 commit comments

Comments
 (0)