[英]chrome extensions - can't get non secure cookies
I'm developing a chrome extension which fetches cookies of a different domain. 我正在开发一个chrome扩展程序,该扩展程序可以提取其他域的cookie。
I'm using chrome.cookies API, ie 我正在使用chrome.cookies API,即
chrome.cookies.getAll({},function(cookies){console.log(cookies.length)})
however, it seems that I can get only cookies marked as secure. 但是,似乎只能得到标记为安全的cookie。 using {secure: false} as filter object I get no results.
使用{secure:false}作为过滤器对象我没有结果。
Also, the cookies marked as secure are actually only one, so I can't be 100% sure that chrome is actually filtering on secure cookies. 另外,标记为安全的cookie实际上只是一个,因此我不能100%确定chrome确实在安全cookie上进行过滤。
The manifest should be set up correctly (with "cookies" as permission and the correct domain) Is there something I am missing? 清单应正确设置(以“ Cookie”作为权限和正确的域),我是否缺少某些内容?
Old question, but still unanswered and coming up in searches. 旧问题,但仍未回答,正在搜索中。 If your manifest.json specifically requests access to
https://foo.bar
, you won't have access to unsecure cookies. 如果manifest.json专门请求访问
https://foo.bar
,那么您将无权访问不安全的cookie。
=> Change it to *://foo.bar
=>将其更改为
*://foo.bar
声明:本站的技术帖子网页,遵循CC BY-SA 4.0协议,如果您需要转载,请注明本站网址或者原文地址。任何问题请咨询:yoyou2525@163.com.