rsnext/packages/next/server/web
JJ Kasper 122899bd37
Add hard navigation guard and fix middleware rewrite cases (#37815)
This adds a guard for whenever we do a hard navigation over a client-navigation to ensure we aren't redirecting to the same URL that we are currently on as this can cause infinite redirecting. This also fixes some cases with middleware rewrites without i18n enabled and expands our middleware suite to test both with i18n and without. 

This also fixes a race condition with the query updating where a user could attempt a route transition and it then gets overridden by the query updating and prevents firing router events during the query updating as these can be false signals of a transition.

## Bug

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

Fixes: https://github.com/vercel/next.js/issues/37804
2022-06-20 11:31:19 +00:00
..
sandbox refactor(middleware): leverages edge-runtime builtins to decorate errors in dev (#37718) 2022-06-17 15:06:30 +00:00
spec-extension Middleware: remove req.ua (#37512) 2022-06-09 11:10:21 +00:00
adapter.ts Add hard navigation guard and fix middleware rewrite cases (#37815) 2022-06-20 11:31:19 +00:00
error.ts Middleware: remove req.ua (#37512) 2022-06-09 11:10:21 +00:00
next-url.ts Refactor server routing (#37725) 2022-06-16 21:43:01 +00:00
types.ts Allow reading request bodies in middlewares (#34294) (#34519) 2022-02-18 19:43:43 +00:00
utils.ts Use Edge Runtime for running Edge Functions locally (#37024) 2022-05-30 12:01:36 +00:00