简体   繁体   中英

chrome extension set cookie for localhost domain using chrome.cookies.set API

I have written a chrome extension which adds some cookie to domain in which my web app is running.

The API chrome.cookie.set() works for all domains except when I use the domain as "localhost". If I try to access the web app running locally using the domain "127.0.0.1" or "0.0.0.0" the API "chrome.cookies.set()" works as expected.

This does not work only when I use the domain as "localhost". How Can I fix this issue for "localhost" domain?

尝试将cookie Domain = null或将localhost的cookie设置为“”。

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