我有需要token
从子域(account.test.com
)设置 cookie()的情况。所以我使用 angular-cookies 实现了它。现在在浏览器 cookie 下,我看到token
的是 to value xyz
、 path to/
和 domain to .test.com
。
我test.com
还将 cookie( orId
) 设置为 value pqrs
、 path to/
和 domain to test.com
。在test.com
开发工具中,我看到设置的 cookieaccount.test.com
和我能够读取的位置token
,这完全没问题。
现在我有一个用例要删除token
和orId
从中删除test.com
。我尝试使用 angular-cookies$cookie.remove('token')
和$cookie.remove('orId')
. 我看到只有orId
被删除但没有token
。那么如何从父域中删除token
set by 。account.test.com
test.com