15 lines
373 B
TypeScript
15 lines
373 B
TypeScript
import createMiddleware from 'next-intl/middleware';
|
|
import {routing} from './i18n/routing';
|
|
import type { NextRequest } from 'next/server';
|
|
|
|
const intlProxy = createMiddleware(routing);
|
|
|
|
export function proxy(request: NextRequest) {
|
|
return intlProxy(request);
|
|
}
|
|
|
|
export const config = {
|
|
// Match only internationalized pathnames
|
|
matcher: ['/', '/(tr|en)/:path*']
|
|
};
|