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

Commit

Permalink
fix: check for username first
Browse files Browse the repository at this point in the history
  • Loading branch information
eddiejaoude committed Jun 30, 2024
1 parent a1f5fe7 commit 5ca8158
Showing 1 changed file with 4 additions and 4 deletions.
8 changes: 4 additions & 4 deletions src/middleware.js
Original file line number Diff line number Diff line change
Expand Up @@ -9,15 +9,15 @@ export const config = {
export async function middleware(req) {
const path = req.nextUrl.pathname;

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

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

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

return NextResponse.next();
}

0 comments on commit 5ca8158

Please sign in to comment.