rsnext/test/e2e/getserversideprops/app/next.config.js
JJ Kasper 02405e2247
Fix getServerSideProps hanging in dev on early end (#33366)
This fixes the case where calling `res.end()` is `getServerSideProps` would cause the request to hang in development due to our `Proxy` around `res` causing internal `ServerResponse` fields to not be available ([related post](https://javascript.info/proxy#built-in-objects-internal-slots)). I also migrated our `getServerSideProps` test suite to an e2e suite with a test for this case. 

## Bug

- [x] Related issues linked using `fixes #number`
- [x] Integration tests added
- [x] Errors have helpful link attached, see `contributing.md`

Fixes: https://github.com/vercel/next.js/issues/15118
Fixes: https://github.com/vercel/next.js/issues/32824
Closes: https://github.com/vercel/next.js/pull/33129
2022-01-16 16:14:21 +00:00

19 lines
352 B
JavaScript

module.exports = {
// replace me
async rewrites() {
return [
{
source: '/blog-post-1',
destination: '/blog/post-1',
},
{
source: '/blog-post-2',
destination: '/blog/post-2?hello=world',
},
{
source: '/blog-:param',
destination: '/blog/post-3',
},
]
},
}