Thanks Samuel - that is very bizarre! I'm using this exact code successfully in a project at the moment, but you're right - it is an issue in the codesandbox demo... I'll do some digging.
It seems to be an RFC at the moment and would be a great solution to be able to set headers - which could allow a redirect in getServerSidePros which would be great.
Currently, I have to use getInitialProps in a HOC and check if we SSR/client and do something like:
Thanks for the reply Chris.
There is an RFC for this issue. Take a look at the codesandbox demo and you will see
Maybe this is handled somehow in next-iron-session
Thanks Samuel - that is very bizarre! I'm using this exact code successfully in a project at the moment, but you're right - it is an issue in the codesandbox demo... I'll do some digging.
It seems to be an RFC at the moment and would be a great solution to be able to set headers - which could allow a redirect in
getServerSidePros
which would be great.Currently, I have to use
getInitialProps
in a HOC and check if we SSR/client and do something like: