Skip to content
This repository has been archived by the owner on May 10, 2021. It is now read-only.

Fixed redirect for index with getServerSideProps #39

Merged
merged 1 commit into from
Sep 13, 2020
Merged

Fixed redirect for index with getServerSideProps #39

merged 1 commit into from
Sep 13, 2020

Conversation

jonasbuntinx
Copy link
Contributor

When adding getServerSideProps to index.js, next-on-netlify would add

/_next/data/.../.json  /.netlify/functions/next_index  200

to the out_publish/_redirects file.

I added a fix so that

/_next/data/.../index.json  /.netlify/functions/next_index  200

will be written instead.

FinnWoelm added a commit that referenced this pull request Sep 13, 2020
Add test to ensure that a NextJS app with an index.js page with
getServerSideProps sets up the correct rewrite for the data route.
See: #39
FinnWoelm added a commit that referenced this pull request Sep 13, 2020
Fix rewrite for data route when pages/index.js uses getServerSideProps.
See: #39

Thanks, @jonasbuntinx 🙌
@FinnWoelm FinnWoelm merged commit 6ca545f into netlify:master Sep 13, 2020
FinnWoelm added a commit that referenced this pull request Sep 13, 2020
@FinnWoelm
Copy link
Collaborator

Thank you, @jonasbuntinx! Great catch and thank you for the fix 🔥 Much appreciated!

PS: If you are building something awesome with next-on-netlify, we would love to feature it in the README 🙂

lindsaylevine added a commit that referenced this pull request Oct 1, 2020
- Copy host property from headers to multiValueHeaders [#44](#44)
- More support for ISR (getStaticProps with revalidate) [Discussion](https://github.com/netlify/next-on-netlify/issues/35) / [Commit](ef45cc5)
- Fixed redirect for index with getServerSideProps [#39](#39)
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

2 participants