I'm working with cookies on NodeJS and I wonder how set multiple cookies to send on client.
I have tried :
1-
var headers = {
Cookie: 'key1=value1; key2=value2'
}
res.cookie(headers)
2-
res.cookie("isStillHere" , 'yes it is !').send('Cookie is set');
res.cookie("IP" , ip).send('Cookie is set');
3-
var setMultipleCookies = []
setMultipleCookies.push('key1=value1','key2=value2')
res.cookie(setMultipleCookies)
Seems nothing works. What is going wrong ? Any hint would be great,
thanks