mirror of
https://github.com/hanzoai/next.js.git
synced 2026-09-24 17:00:51 +00:00
This ensures we properly set the matched header when applying a middleware skip optimization so that the client router has enough context to finish resolving the dynamic route params. Fixes: https://github.com/vercel/next.js/issues/59561 Closes NEXT-2803
41 lines
913 B
JavaScript
41 lines
913 B
JavaScript
module.exports = {
|
|
i18n: {
|
|
locales: ['ja', 'en', 'fr', 'es'],
|
|
defaultLocale: 'en',
|
|
},
|
|
rewrites() {
|
|
return {
|
|
beforeFiles: [
|
|
{
|
|
source: '/beforefiles-rewrite',
|
|
destination: '/ab-test/a',
|
|
},
|
|
],
|
|
afterFiles: [
|
|
{
|
|
source: '/article/:slug*',
|
|
destination: '/detail/:slug*',
|
|
},
|
|
{
|
|
source: '/afterfiles-rewrite',
|
|
destination: '/ab-test/b',
|
|
},
|
|
{
|
|
source: '/afterfiles-rewrite-ssg',
|
|
destination: '/fallback-true-blog/first',
|
|
},
|
|
{
|
|
source: '/config-rewrite-to-dynamic-static/:rewriteSlug',
|
|
destination: '/ssg',
|
|
},
|
|
{
|
|
source: '/external-rewrite-body',
|
|
destination:
|
|
'https://next-data-api-endpoint.vercel.app/api/echo-body',
|
|
},
|
|
],
|
|
fallback: [],
|
|
}
|
|
},
|
|
}
|