diff --git a/middleware.ts b/middleware.ts deleted file mode 100644 index 9d72ca93..00000000 --- a/middleware.ts +++ /dev/null @@ -1,20 +0,0 @@ -import { NextResponse } from "next/server"; - -export function middleware(request: any) { - const localeCookie = request.cookies.get("NEXT_LOCALE")?.value; - if (localeCookie !== undefined && request.nextUrl.locale !== localeCookie) { - console.log( - new URL(`/${localeCookie.value}/${request.nextUrl.pathname}`, request.url) - .href - ); - return NextResponse.redirect( - new URL( - `/${localeCookie}${request.nextUrl.pathname}`, - request.url - ).href.toString() - ); - } -} -export const config = { - matcher: ["/", "/home"], // paths on which middleware will work -};