Express: 4.x
NodeJS: 12.x
On a.example.com I have a GET listener that redirects to b.example.com and sets a cookie on b.example.com.
app.get('/foo', (req, res) => {
res.cookie('name', 'foo', { domain: '.example.com', path: '/', secure: true })
res.cookie('age', '21', { domain: '.example.com', path: '/', secure: true })
res.redirect(302, 'https://b.example.com');
})
But none of the cookies are set in b.example.com. What am I missing here?