简体   繁体   中英

chrome extensions - can't get non secure cookies

I'm developing a chrome extension which fetches cookies of a different domain.

I'm using chrome.cookies API, ie

chrome.cookies.getAll({},function(cookies){console.log(cookies.length)})

however, it seems that I can get only cookies marked as secure. using {secure: false} as filter object I get no results.

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.

The manifest should be set up correctly (with "cookies" as permission and the correct domain) Is there something I am missing?

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.

=> Change it to *://foo.bar

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM