I am developing a little web app where i wanted to set cookies from the server side with express. I'm using firebase functions, express and CookieParser. When i deploy my project into firebase cloud works perfectly, but when i serve from my computer 'Set-cookies' doesn't appear in the header and there are no cookies store. Why is this happening?
node-v8.11.2
app.use(cookieParser());
app.get('/cookie',(req,res)=>{
res.cookie("test","This is a test");
res.end('test');
});
EDIT: I fix it by setting cache control to private.
app.get('/cookie',(req,res)=>{
res.setHeader('Cache-Control','private');
res.cookie("test","This is a test");
res.end('test');
});