我目前正在使用我的API来负责认证以及在我的SPA上使用的所有API端点。 API运行在api.domain.com
上,SPA运行在www.domain.com
上。全部在相同的SSL证书(通配符类型)上。Cookie未被保存
不幸的是,当我从api.domain.com
的标题中返回Set-cookie
它不会被保存,但我可以在Chromes调试器中看到它。
我会是如下:
'Set-cookie':'__Secure-ID=38afes7a8-38afes7a8-38afes7a8-38afes7a8; Expires=Mon, 11-Sep-2017 23:03:13 GMT; Secure; HttpOnly; Domain=.domain.com'
即使世界检索它没有问题,在浏览器中查看它,但它不会停留,并且不服从过期,它只是消失了,当我浏览到api.domain.com
或甚至www.domain.com
的其他端点。
什么问题?