I have to set a session id from my ExpressJS middleware with a "Set-Cookie" header, that I get from another source. It seems like ExpressJS blocks it. Here is my code snippet:
res.cookie("sessionid", "value-from-backend", {
domain: ".domain.com",
httpOnly: true
})
Another Set-Cookie header that I tried, works without a problem:
res.cookie("test", "lel", {
domain: ".domain.com",
httpOnly: true
})
Do I have to use ExpressJS cookie session to get this work or is there a simpler way? And how can I achieve this with ExpressJS cookie session?
My ExpressJS version is: `4.16.3.
It is no duplicate of other Set-Cookie problems, because it is just not working with sessionid
but with any other cookie name.