Set-Cookie is not working when deployed on vercel #60159
Replies: 3 comments
-
Were you able to solve it? I'm facing the same issues!. |
Beta Was this translation helpful? Give feedback.
-
please i also need the solution to this problem |
Beta Was this translation helpful? Give feedback.
-
const allowedorigins = [ app.use( app.set("trust proxy", 1); // Trust Vercel reverse proxy app.use( This work for Node.js and express.js |
Beta Was this translation helpful? Give feedback.
Uh oh!
There was an error while loading. Please reload this page.
Uh oh!
There was an error while loading. Please reload this page.
-
Summary
I have a next js frontend (13.5.6) and node js express(4.18.1) backend hosted on different domains. The next js has a middleware, which checks if the user has cookies while sending the request or not and if not it calls a backend api and sets the cookies on client-side. Suddenly it has stopped working.
Previously this same code was setting both (accessTokenand refreshToken), but now it only sets the token which is 1st defined, the other token is not shown in client side cookies (this code also works locally, but when deployed it start to set only 1 token)
Additional information
Example
No response
Beta Was this translation helpful? Give feedback.
All reactions