change middleware to proxy to match conventions
This commit is contained in:
@@ -0,0 +1,12 @@
|
||||
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: '/',
|
||||
}
|
||||
Reference in New Issue
Block a user