Files
mypage/middleware.ts
RJ 101624c4d5
All checks were successful
PR Checks / lint-and-build (pull_request) Successful in 18s
📝 priettier check
2025-12-04 15:57:39 +02:00

17 lines
377 B
TypeScript

import createMiddleware from 'next-intl/middleware'
import { routing } from './src/i18n/routing'
export default createMiddleware({
...routing,
localeDetection: true,
localeCookie: {
name: 'NEXT_LOCALE',
maxAge: 60 * 60 * 24 * 365,
sameSite: 'lax',
},
})
export const config = {
matcher: ['/', '/(en|ro)/:path*', '/((?!api|_next|_vercel|.*\\..*).*)'],
}