Skip to content

Commit

Permalink
Merge pull request #1448 from gamebeaker/claudflare_chrome
Browse files Browse the repository at this point in the history
set_cookie_domain_to_highest_domain
  • Loading branch information
gamebeaker authored Aug 26, 2024
2 parents 59dc2fd + 59d053d commit 42217a5
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion plugin/js/HttpClient.js
Original file line number Diff line number Diff line change
Expand Up @@ -217,7 +217,10 @@ 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.replace(/^www./, ""),partitionKey: {}});

//set domain to the highest level from the website as all subdomains are included #1447 #1445
let urlparts = parsedUrl.hostname.split(".");
let cookies = await chrome.cookies.getAll({domain: urlparts[urlparts.length-2]+"."+urlparts[urlparts.length-1],partitionKey: {}});

//create new cookies for the site without the partitionKey
//cookies without the partitionKey get sent with fetch
Expand Down

0 comments on commit 42217a5

Please sign in to comment.