Files
matheoguilbert.fr/proxy.ts
T

12 lines
302 B
TypeScript

import { NextResponse } from "next/server";
import type { NextRequest } from "next/server";
export function proxy(request: NextRequest) {
if (request.nextUrl.pathname === '/') {
return NextResponse.redirect(new URL('/fr', request.url));
}
}
export const config = {
matcher: '/',
}