Commit graph

6 commits

Author SHA1 Message Date
JJ Kasper
a5cb28d907
Ensure redirects are handled properly from cache (#18806)
This updates the GS(S)P redirect handling to make sure to handle redirects correctly when coming from the incremental-cache. Additional tests have been added to ensure the redirects work correctly after the cache is populated. 

Fixes: https://github.com/vercel/next.js/issues/18735
Fixes: https://github.com/vercel/next.js/issues/18783
2020-11-04 22:18:44 +00:00
JJ Kasper
f791577569
Ensure redirect from GS(S)P doesn't render (#18749)
This ensures we don't render the page un-necessarily when a redirect is returned from `getStaticProps` or `getServerSideProps`.

Possibly related: https://github.com/vercel/next.js/issues/18735
Closes: https://github.com/vercel/next.js/issues/18747
2020-11-03 16:40:50 +00:00
JJ Kasper
c8d26edf57
Allow passing statusCode for GS(S)P redirect (#18422)
This adds support for passing `statusCode` in a `redirect` from `getServerSideProps` or `getStaticProps` which matches the `redirect` shape allowed to be returned for `redirects` in `next.config.js`

Closes: https://github.com/vercel/next.js/issues/18350
2020-11-02 21:47:59 +00:00
JJ Kasper
4026d9bea0
Remove unstable_ prefix from unstable_redirect (#18282) 2020-10-27 04:37:27 -04:00
Tasuku Uno
3f22490a59
Fix browser back issue of redirects from getServerSideProps / getStaticProps (#17741)
* Fix test without expect for redirects from getStaticProps/getServerSideProps

* Fix browser back issue of redirects from getServerSideProps / getStaticProps
2020-10-27 00:14:23 -05:00
JJ Kasper
bc80fb4fb2
Add handling for redirects from getStaticProps/getServerSideProps (#16642)
Co-authored-by: Tim Neutkens <timneutkens@me.com>
2020-09-08 09:23:21 +02:00