79118134

Date: 2024-10-23 13:36:03
Score: 0.5
Natty:
Report link

I wanted to save someone the pain because I couldn't find a similar SO question: in case you have everything correct mentioned in Nate Anderson's answer and still cannot get the cookie to be set, and in my case the Set-Cookie response header was not sent from the server, it can potentially be that your server is behind a proxy and therefore you need to account for that. In my Express.js server I used app.use("trust proxy", 1) as mentioned here https://github.com/expressjs/session/issues/983 and it was solved.

Reasons:
  • Has code block (-0.5):
  • Single line (0.5):
  • Low reputation (0.5):
Posted by: G-8