From a914510309ca5411aebc71354c71825efd8271cc Mon Sep 17 00:00:00 2001 From: gamebeaker Date: Sun, 25 Aug 2024 17:24:27 +0200 Subject: [PATCH] fix_www_subdomain_cookie_issue --- plugin/js/HttpClient.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/plugin/js/HttpClient.js b/plugin/js/HttpClient.js index 3065b689..8d6b6168 100644 --- a/plugin/js/HttpClient.js +++ b/plugin/js/HttpClient.js @@ -217,7 +217,7 @@ class HttpClient { // get all cookie from the site which use the partitionKey (e.g. cloudflare) //keep old code for reference in case it changes again //let cookies = await chrome.cookies.getAll({partitionKey: {topLevelSite: topLevelSite}}); - let cookies = await chrome.cookies.getAll({domain: parsedUrl.hostname,partitionKey: {}}); + let cookies = await chrome.cookies.getAll({domain: parsedUrl.hostname.replace(/^www./, ""),partitionKey: {}}); //create new cookies for the site without the partitionKey //cookies without the partitionKey get sent with fetch