This commit is contained in:
2024-11-21 13:45:48 +08:00
parent abaec2c1c3
commit 7e9dfce293
2 changed files with 15 additions and 3 deletions

12
src/lib/middleware.ts Normal file
View File

@@ -0,0 +1,12 @@
import { NextResponse } from "next/server";
import type { NextRequest } from "next/server";
// This function can be marked `async` if using `await` inside
export function middleware(request: NextRequest) {
return NextResponse.redirect(new URL("/home", request.url));
}
// See "Matching Paths" below to learn more
export const config = {
matcher: "/about/:path*",
};