Files
no-copy-admin-panel-frontend/src/proxy.ts
T

29 lines
657 B
TypeScript
Raw Normal View History

2026-01-19 12:55:41 +07:00
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('.')
) {
return NextResponse.next()
}
const intlResponse = intlMiddleware(request);
if (intlResponse) {
return intlResponse
}
return NextResponse.next();
}
export const config = {
2026-01-22 17:30:46 +07:00
matcher: ['/((?!_next/static|_next/image|.*\\.png$).*)']
2026-01-19 12:55:41 +07:00
};