0

i was looking cookies in chrome dev tools and what saw that there was nothing there. I tried to do

document.cookie
''

but as you can see i got an empty string.

This is how i set cookie from backend :

res.cookie('token', token, {
  maxAge: 24 * 60 * 60 * 1000,
});

and http response :

HTTP/1.1 200 OK
X-Powered-By: Express
Access-Control-Allow-Origin: *
Set-Cookie: token=eyJhbGciOiJIUzI1NiIsInR5cCI6IkpXVCJ9.eyJfaWQiOiI2MTA0ODNiMWZjYWRjMzJlNThlYzliZGYiLCJpYXQiOjE2Mjc5MDU2ODksImV4cCI6MTYyNzk5MjA4OX0.0Tl9qdfOfYmrSCmhwm4_nj5YJoQ4nIena8GkDVMuudg; Max-Age=86400; Path=/; Expires=Tue, 03 Aug 2021 12:01:29 GMT
Content-Type: application/json; charset=utf-8
Content-Length: 279
ETag: W/"117-n8AH6F39BYaXWbbpDJY0ai6Z4l8"
Date: Mon, 02 Aug 2021 12:01:29 GMT
Connection: keep-alive
Keep-Alive: timeout=5

I don't know if this is normal. Thanks for any respose.

0 Answers0