rsnext/test/e2e/middleware-trailing-slash/app/next.config.js
JJ Kasper 9d22da476b
Ensure trailing slash is handled correctly with middleware (#38282)
* Ensure trailing slash is handled correctly with middleware

* update source modifying

* undo extra change
2022-07-04 09:31:07 -05:00

32 lines
611 B
JavaScript

module.exports = {
trailingSlash: true,
redirects() {
return [
{
source: '/redirect-1',
destination: '/somewhere/else/',
permanent: false,
},
]
},
rewrites() {
return [
{
source: '/rewrite-1',
destination: '/ssr-page?from=config',
},
{
source: '/rewrite-2',
destination: '/about/a?from=next-config',
},
{
source: '/sha',
destination: '/shallow',
},
{
source: '/rewrite-3',
destination: '/blog/middleware-rewrite?hello=config',
},
]
},
}