pre-defining data in SSR?

Curious — can you use NextJS middleware to push data into getServerSideProps? Let’s say you have some global variable that gets reset every page refresh — but you need to populate through some API or pass it from the client. What’s a good way to populate the server with that global variable before it reaches a pages SSR
3 Replies
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
l
l2y ago
I don’t want to set it as a header or a cookie. I guess I have to see how next auth does it in regards to getting sessions within SSR that’s synced with the sessions on the client
Unknown User
Unknown User2y ago
Message Not Public
Sign In & Join Server To View
Want results from more Discord servers?
Add your server