I am setting a few cookies from my node backend like so:
res.setHeader('Set-Cookie', 'id=' + result.id + '; expires=' + new Date(new Date().getTime() + (1800 * 1000)).toUTCString() + '; path=/');
I would like to know when this expires in my Angular app, so I setup a $http response interceptor and my interceptor returns with a response property:
response: function(response) {
console.log(response.headers());
return response;
}
But response.headers()
show all headers but the cookies, though I am able to see them on Chrome's Network tab. I am not setting the cookies to be httpOnly anywhere explicitly. What am I missing here?