Make `permanentRedirect` return 308 in route handlers (#56065)
### Why? `permanentRedirect` currently still returns a 307 response if called inside a route handler <img width="465" alt="image" src="https://github.com/vercel/next.js/assets/44609036/e0cddd37-0292-4865-a423-7bf11ad6beae"> This PR tries to fix that. ### How? Make `handleTemporaryRedirectResponse` (now renamed `handleRedirectResponse`) accept a status value, then `getRedirectStatusCodeFromError` is used to retrieve that status (307 or 308).
Showing
Please
register
or
sign in
to comment