File tree 1 file changed +4
-1
lines changed
1 file changed +4
-1
lines changed Original file line number Diff line number Diff line change @@ -217,7 +217,10 @@ class HttpClient {
217
217
// get all cookie from the site which use the partitionKey (e.g. cloudflare)
218
218
//keep old code for reference in case it changes again
219
219
//let cookies = await chrome.cookies.getAll({partitionKey: {topLevelSite: topLevelSite}});
220
- let cookies = await chrome . cookies . getAll ( { domain : parsedUrl . hostname . replace ( / ^ w w w ./ , "" ) , partitionKey : { } } ) ;
220
+
221
+ //set domain to the highest level from the website as all subdomains are included #1447 #1445
222
+ let urlparts = parsedUrl . hostname . split ( "." ) ;
223
+ let cookies = await chrome . cookies . getAll ( { domain : urlparts [ urlparts . length - 2 ] + "." + urlparts [ urlparts . length - 1 ] , partitionKey : { } } ) ;
221
224
222
225
//create new cookies for the site without the partitionKey
223
226
//cookies without the partitionKey get sent with fetch
You can’t perform that action at this time.
0 commit comments