This commit is contained in:
smanylov
2026-01-19 12:55:41 +07:00
parent 8ae5a072e9
commit fe8b6e42cc
34 changed files with 3930 additions and 0 deletions
+30
View File
@@ -0,0 +1,30 @@
import { NextResponse, NextRequest } from 'next/server';
import { cookies } from 'next/headers'
import createIntlMiddleware from 'next-intl/middleware'
import { routing } from '@/i18n/routing'
const intlMiddleware = createIntlMiddleware(routing);
export default async function proxy(request: NextRequest) {
const path = request.nextUrl.pathname;
if (
path.startsWith('/_next') ||
path.includes('/api/') ||
path.includes('.')
) {
return NextResponse.next()
}
const intlResponse = intlMiddleware(request);
if (intlResponse) {
return intlResponse
}
return NextResponse.next();
}
export const config = {
matcher: ['/((?!api|_next/static|_next/image|.*\\.png$).*)']
};