New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Unable to set cookie when process.server is true #450
Comments
Where are you writing this? Do you have Nuxt with a proxy? Set-Cookie is coming from server to client, so that client can add Cookie header from what it previously received. What you're doing feels like you're transferring between Can you give more info about what you're trying to achieve, and where this is done? |
Hi @renoirb , I write this in a plugin (which use @nuxt/axios module)
I have several serverMiddlewares :
and problem scenario : When i do :
i trying to detect if the server axios response contain set-cookie to add this in nuxt client response (for the view). But when i have no cookie, on the first request, I tried cookiejar or this https://gist.github.com/nzvtrk/ebf494441e36200312faf82ce89de9f2 but it doesn't seem to work...or not compatible with nuxt/axios mobule anyway. There is something that i haven't understand ? |
What problem does this feature solve?
I have a serverMiddleware with a cookie parser with an internal API (with express).
// Export the server middleware
All work fine client side but when axios request is trigerred server side, axios doesn't add set-cookie. I have to do:
Why ?
The text was updated successfully, but these errors were encountered: