UNPKG

validation-box

Version:

The only validation library - with flexible regex - you need.

15 lines (11 loc) 362 B
import { NextResponse } from "next/server"; import type { NextRequest } from "next/server"; export function middleware(request: NextRequest) { if (request.nextUrl.pathname === "/") { return NextResponse.redirect(new URL("/docs/introduction", request.url)); } return NextResponse.next(); } export const config = { matcher: "/", };