config traduction middleware

This commit is contained in:
2026-04-14 20:17:17 +02:00
parent 8fdcc33079
commit 308099ca2a
4 changed files with 12 additions and 0 deletions
+12
View File
@@ -0,0 +1,12 @@
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('/fr', request.url));
}
}
export const config = {
matcher: '/',
}