📄 Huge intl feature
Some checks failed
Some checks failed
This commit was merged in pull request #10.
This commit is contained in:
20
middleware.ts
Normal file
20
middleware.ts
Normal file
@@ -0,0 +1,20 @@
|
||||
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|.*\\..*).*)'
|
||||
]
|
||||
};
|
||||
Reference in New Issue
Block a user