rsnext/packages/next
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
..
bin Update experimental profiling (#20357) 2020-12-21 16:02:41 +00:00
build Require only build directory to be writeable for build (#20977) 2021-01-25 12:09:22 -05:00
bundles fix: upgrade pinned deps for tests (#21515) 2021-01-25 12:08:08 -05:00
cli Fix hostname message in dev/start (#20409) 2021-01-25 16:13:12 +01:00
client refactor(next): client/index.tsx (#20806) 2021-01-07 15:02:10 +00:00
compiled fix: upgrade pinned deps for tests (#21515) 2021-01-25 12:08:08 -05:00
export Critical css fix (#21462) 2021-01-25 12:43:05 -05:00
lib fix(next): respect extends in tsconfig with exclude and include (#16619) 2021-01-24 14:24:36 +01:00
next-server Fix aspath for getInitialProps (#20572) 2021-01-25 18:26:32 +00:00
pages Add experimental per-page option to disable JS preloads (#21329) 2021-01-19 19:38:15 +00:00
server feat: webpack inlining with configuration for v4 / v5 (#20598) 2021-01-13 20:59:08 -05:00
telemetry ncc 0.25.0 upgrade and fixes (#18873) 2020-11-06 02:33:14 +00:00
types Add experimental per-page option to disable JS preloads (#21329) 2021-01-19 19:38:15 +00:00
amp.d.ts Remove re-exports of default when they don't exist (#9450) 2019-11-18 20:11:59 -06:00
amp.js Move next-server back into next package (#8613) 2019-09-04 10:00:54 -04:00
app.d.ts Move syntax formatting to prettier (#7454) 2019-05-29 13:57:26 +02:00
app.js
babel.d.ts Remove re-exports of default when they don't exist (#9450) 2019-11-18 20:11:59 -06:00
babel.js
client.d.ts Move syntax formatting to prettier (#7454) 2019-05-29 13:57:26 +02:00
client.js
config.d.ts Move next-server back into next package (#8613) 2019-09-04 10:00:54 -04:00
config.js Move next-server back into next package (#8613) 2019-09-04 10:00:54 -04:00
constants.d.ts Remove default export from constants.d.ts (#8979) 2019-10-07 14:30:07 +02:00
constants.js Move next-server back into next package (#8613) 2019-09-04 10:00:54 -04:00
data.d.ts Remove re-exports of default when they don't exist (#9450) 2019-11-18 20:11:59 -06:00
data.js
document.d.ts Move syntax formatting to prettier (#7454) 2019-05-29 13:57:26 +02:00
document.js
dynamic.d.ts Move next-server back into next package (#8613) 2019-09-04 10:00:54 -04:00
dynamic.js Move next-server back into next package (#8613) 2019-09-04 10:00:54 -04:00
error.d.ts Move syntax formatting to prettier (#7454) 2019-05-29 13:57:26 +02:00
error.js
experimental-script.d.ts Script loader component (#18281) 2020-12-01 19:10:16 +01:00
experimental-script.js Script loader component (#18281) 2020-12-01 19:10:16 +01:00
head.d.ts Move next-server back into next package (#8613) 2019-09-04 10:00:54 -04:00
head.js Move next-server back into next package (#8613) 2019-09-04 10:00:54 -04:00
image.d.ts Image component foundation (#17343) 2020-10-14 11:57:10 +02:00
image.js Image component foundation (#17343) 2020-10-14 11:57:10 +02:00
license.md Update license year for all packages 2021-01-11 11:12:19 +01:00
link.d.ts Move syntax formatting to prettier (#7454) 2019-05-29 13:57:26 +02:00
link.js
package.json v10.0.6-canary.8 2021-01-25 12:59:39 -05:00
README.md Update logo for dark mode (#20047) 2020-12-09 23:57:07 +00:00
router.d.ts Move syntax formatting to prettier (#7454) 2019-05-29 13:57:26 +02:00
router.js
taskfile-babel.js ncc 0.25.0 upgrade and fixes (#18873) 2020-11-06 02:33:14 +00:00
taskfile-ncc.js feat: webpack inlining with configuration for v4 / v5 (#20598) 2021-01-13 20:59:08 -05:00
taskfile.js fix: upgrade pinned deps for tests (#21515) 2021-01-25 12:08:08 -05:00
tsconfig.json Move next-server back into next package (#8613) 2019-09-04 10:00:54 -04:00

Next.js

Getting Started

Visit https://nextjs.org/learn to get started with Next.js.

Documentation

Visit https://nextjs.org/docs to view the full documentation.

Who is using Next.js?

Next.js is used by the world's leading companies. Check out the Next.js Showcase to learn more.

Community

The Next.js community can be found on GitHub Discussions, where you can ask questions, voice ideas, and share your projects.

To chat with other community members you can join the Next.js Discord.

Our Code of Conduct applies to all Next.js community channels.

Contributing

Please see our contributing.md.

Authors