rsnext/test/integration/getserversideprops/next.config.js
JJ Kasper d3f4a4cb2a
Provide resolvedUrl to getServerSideProps (#17082)
This continues off of https://github.com/vercel/next.js/pull/17081 and provides this normalized `asPath` value in the context provided to `getServerSideProps` to provide the consistent value since the request URL can vary between direct visit and client transition and the alternative requires building the URL each time manually. 

Kept this change separate from https://github.com/vercel/next.js/pull/17081 since this is addressing a separate issue and allows discussion separately. 

Closes: https://github.com/vercel/next.js/issues/16407
2020-09-14 21:01:04 +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',
},
]
},
}