rsnext/packages/next/server
JJ Kasper 8c3c2b7ea2
Update redirect regexes to not match _next (#27143)
This updates redirects' regexes to not match `/_next` paths since this is currently unexpected and can easily cause a multi-match redirect to break loading client-side assets. This also fixes custom-routes not matching correctly when `trailingSlash: true/false` is used

## Bug

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

x-ref: https://github.com/vercel/next.js/discussions/24683
x-ref: [slack thread](https://vercel.slack.com/archives/CGU8HUTUH/p1626159845474000)
2021-07-13 19:38:14 +00:00
..
dev Add some missing fields to the NextConfig type (#27126) 2021-07-12 21:38:57 +00:00
lib Workaround for Node.js 16+ on Apple Silicon M1 (#27031) 2021-07-12 17:05:41 +00:00
api-utils.ts Include message body in redirect responses (#25257) 2021-07-09 16:32:48 +00:00
config-shared.ts Add some missing fields to the NextConfig type (#27126) 2021-07-12 21:38:57 +00:00
config-utils-worker.ts Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00
config-utils.ts Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00
config.ts Add some missing fields to the NextConfig type (#27126) 2021-07-12 21:38:57 +00:00
crypto-utils.ts Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00
denormalize-page-path.ts Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00
font-utils.ts Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00
get-page-files.ts Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00
get-route-from-entrypoint.ts Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00
htmlescape.ts Upgrade to Prettier 2 (#13061) 2020-05-18 15:24:37 -04:00
image-config.ts Add some missing fields to the NextConfig type (#27126) 2021-07-12 21:38:57 +00:00
image-optimizer.ts Enhance next dev performance with placeholder=blur (#27061) 2021-07-10 20:27:14 +00:00
incremental-cache.ts More explicit typing for IncrementalCache API (#26941) 2021-07-06 15:45:49 +00:00
load-components.ts Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00
next-server.ts Update redirect regexes to not match _next (#27143) 2021-07-13 19:38:14 +00:00
next.ts Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00
node-polyfill-fetch.js Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00
normalize-page-path.ts Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00
optimize-amp.ts Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00
render.tsx Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00
require.ts Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00
response-cache.ts Replace withCoalescedInvoke with ResponseCache (#26997) 2021-07-12 19:47:39 +00:00
router.ts Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00
send-payload.ts Replace withCoalescedInvoke with ResponseCache (#26997) 2021-07-12 19:47:39 +00:00
serve-static.ts Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00
utils.ts Move next-server directory files to server directory (#26756) 2021-06-30 13:44:40 +02:00