After deploying my node.js package to docker swarm as a stack, my node.js app causing re-generate session id every request.Normally, it just re-use the session , so I guess theres something about the cookie that does not accept different domains.The page that contains the cookie which makes the request to the api is localhost:9000, and the api it connects to has this following session settingsapp.use(session( { name: 'session-id', resave: true, saveUninitialized: false, cookie: { secure: false, domain: 'example.com', sameSite: 'none', httpOnly: false, maxAge: 345600000 } } ));
Submitted August 19, 2020 at 03:33PM by exilen
No comments:
Post a Comment