Merge pull request #2654 from mozilla/feat-#303

#303: Reset cookies in site manager
This commit is contained in:
luke crouch
2024-08-28 11:26:57 -05:00
committed by GitHub
9 changed files with 205 additions and 12 deletions
+10
View File
@@ -577,6 +577,16 @@ window.assignManager = {
return true;
},
async _resetCookiesForSite(hostname, cookieStoreId) {
const hostNameTruncated = hostname.replace(/^www\./, ""); // Remove "www." from the hostname
await browser.browsingData.removeCookies({
cookieStoreId: cookieStoreId,
hostnames: [hostNameTruncated] // This does not remove cookies from associated domains. To remove all cookies, we have a container storage removal option.
});
return true;
},
async _setOrRemoveAssignment(tabId, pageUrl, userContextId, remove) {
let actionName;
// https://github.com/mozilla/testpilot-containers/issues/626