rsnext/test/integration/trailing-slashes-rewrite/next.config.js
JJ Kasper e1e6cfa189
Fix page checking failing with trailingSlash (#16362)
This fixes page checking failing due to the trailing slash being present which causes pages to proxied by a rewrite when they shouldn't be. This also adds additional tests to ensure rewriting to an external resource is working correctly with `trailingSlash: true`

Fixes: https://github.com/vercel/next.js/issues/15700
2020-08-20 04:05:38 +00:00

16 lines
279 B
JavaScript

module.exports = {
trailingSlash: true,
async rewrites() {
return [
{
source: '/:path*/',
destination: '/:path*/',
},
{
source: '/:path*/',
destination: 'http://localhost:__EXTERNAL_PORT__/:path*',
},
]
},
}