rsnext/packages/next/next-server/server
kaykdm 47cb4cf850
Fix aspath for getInitialProps (#20572)
Fixes: https://github.com/vercel/next.js/issues/20370

> AsPath is incorrect on Server if you use rewrites and getInitialProps. On the server, asPath is the rewritten asPath while on the client asPath ist as given in the request URL.

The same issue was used to happen on `getServersideProps`, but it was fixed in this PR (https://github.com/vercel/next.js/pull/17121).
`getInitialProps` needs same fix except when the target is serverless, which has correct `asPath` value.

Additional tests have been added in the `getInitialProps` suite to ensure correct asPath with rewrites.
2021-01-25 18:26:32 +00:00
..
lib Fix un-transpiled client file with rewrites (#16453) 2020-08-21 19:11:25 +00:00
api-utils.ts Call res.write('') inside apiRes.redirect() helper to prevent an edge case (#20461) 2021-01-04 10:14:15 +00:00
config.ts ci: fix webpack 5 enabling for tests (#21436) 2021-01-22 11:20:53 -06:00
crypto-utils.ts chore(next-server): api-utils,crypto-utils,next-server missing types (#13431) 2020-05-27 15:43:10 +00:00
denormalize-page-path.ts Add initial handling for dynamic route href resolving and rewrites on the client (#15231) 2020-08-13 14:39:36 +02:00
font-utils.ts Font optimizations (#14746) 2020-07-28 12:19:28 +02:00
get-page-files.ts Modify low priority files in manifest (#16181) 2020-08-14 04:30:25 +00:00
get-route-from-entrypoint.ts Fix app-document-import-order test for webpack 5 (#15224) 2020-07-17 10:38:06 +02:00
image-config.ts Fallback to default config to enable testing Image component (#19107) 2020-11-12 19:24:08 +00:00
image-optimizer.ts Fix image cache for vector and animated images (#20480) 2021-01-13 18:06:04 +00:00
incremental-cache.ts Wrong index path revalidation timer (#20818) 2021-01-13 16:15:11 +00:00
load-components.ts Allow pages to be async modules to enable top-level-await (#17590) 2020-10-14 11:55:42 +02:00
next-server.ts Fix aspath for getInitialProps (#20572) 2021-01-25 18:26:32 +00:00
node-polyfill-fetch.js ncc 0.25.0 upgrade and fixes (#18873) 2020-11-06 02:33:14 +00:00
normalize-page-path.ts Add initial handling for dynamic route href resolving and rewrites on the client (#15231) 2020-08-13 14:39:36 +02:00
optimize-amp.ts Revert "@ampproject/toolbox-optimizer" 2020-03-30 16:26:25 -04:00
render.tsx Add experimental per-page option to disable JS preloads (#21329) 2021-01-19 19:38:15 +00:00
require.ts Remove tslint disables (#16116) 2020-08-12 14:39:07 +00:00
router.ts Ensure trailingSlash redirect applies correctly for i18n (#19859) 2020-12-07 17:36:46 +00:00
send-payload.ts Enable handling for revalidate and notFound (#19165) 2020-11-14 07:12:47 +00:00
serve-static.ts Add support for Image Optimizer (#17749) 2020-10-16 13:10:01 +02:00
utils.ts Improve Server Lib Utilities (#12119) 2020-04-23 09:38:57 +02:00