Set-cookie in response not set for Angular2 post request

后端 未结 3 1462
栀梦
栀梦 2020-12-05 16:04

When I make a put request in Angular2, I receive the expected set-cookie in the response. However my browser (tried both Chrome and Firefox) refuses to set the cookie.

3条回答
  •  执念已碎
    2020-12-05 16:30

    I had the same problem but for me the cookie had a path to '/api/order'.. So only request to this path contained the cookie.. I altered the path to '/' and now everthig is fine..

提交回复
热议问题