rsnext/test/e2e/app-dir/interception-middleware-rewrite
Zack Tanner 5f98e9bc6e
fix behavior when revisiting an intercepted route (#59168)
### What?
When using rewrites, in the scenario where a user visits an intercepted
route, reloads the page, goes back, and then revisits the same route, we
serve the page rather than the intercepted route.

### Why?
#59094 fixed the case where `ACTION_RESTORE` was not restoring `nextUrl`
properly. However there's a separate issue where when the `SERVER_PATCH`
action comes in, `handleMutable` attempts to compute `nextUrl` by
comparing the patched tree with the current tree. In the case of the
popstate event, both trees are the same, so the logic is currently
configured to fallback to `canonicalUrl`, which is not the correct URL
to use in the case of rewrites.

### How?
If the computed changed path is null, we should only fallback to using
`canonicalUrl` if we don't have a valid `nextUrl` that we can use.

Closes NEXT-1747
Fixes #56072
2023-12-01 08:54:01 -08:00
..
app fix interception routes with rewrites (#59094) 2023-11-30 08:57:42 +01:00
interception-middleware-rewrite.test.ts fix behavior when revisiting an intercepted route (#59168) 2023-12-01 08:54:01 -08:00
middleware.ts interception routes: support middleware rewrites (#48450) 2023-04-17 10:07:31 +02:00
next.config.js Remove experimental config from create-next-app (#49241) 2023-05-05 00:22:28 -07:00
tsconfig.json Update default moduleResolution in tsconfig.json from node to bundler (#51957) 2023-07-18 15:11:09 +00:00