I'm currently sending a cookie back from my Node server like this:
res.setHeader('Set-Cookie', [`session=${sessionCookie}; HttpOnly; Secure`]);
res.status(200).send(JSON.stringify({status: 'success'}));
When I go to Chrome, I can see in the Network call that the session cookie is received. It's not making its way over to the Application tab.
I'm then going to make my call using Fetch (have tried both 'include' and 'same-origin' but cannot find the cookie in the Fetch request.
fetch(`http://localhost:3000/api/test`,
{
method: 'POST',
credentials: 'same-origin'
})
Is there anything wrong with this setup that may be causing the cookie to not make its way into the request?