You can use getServerSideProps to look at the cookies before rendering the page for a user.
It’s slightly annoying though since you can’t use both getServerSideProps and getStaticProps on the same page.
It’s slightly annoying though since you can’t use both getServerSideProps and getStaticProps on the same page.
However another thing is the middleware is all through the edge runtime. So things like regular postgres drivers don't work (although I did hear that Cloudflare workers added TCP so maybe that's coming).
I will say Planetscale and the hottest db as a service platforms all seem to have an edge adapter to allow for this but your SOL otherwise.
Yes it is?