Try cookie Domain = null or set the cookie to " " for localhost.
chrome extension set cookie for localhost domain using chrome.cookies.set API
-
09-10-2022 - |
题
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?
解决方案
不隶属于 StackOverflow