Skip to content

Commit

Permalink
fix: chrome as onBeforeSendHeaders default
Browse files Browse the repository at this point in the history
  • Loading branch information
IITII committed May 8, 2024
1 parent 6f64825 commit 4ce8bb9
Showing 1 changed file with 5 additions and 6 deletions.
11 changes: 5 additions & 6 deletions src/background/service.ts
Original file line number Diff line number Diff line change
Expand Up @@ -612,13 +612,14 @@ export default class PTPlugin {
let opt_extraInfoSpec: string[] = [];

switch (PPF.browserName) {
case EBrowserType.Firefox:
opt_extraInfoSpec = ["requestHeaders", "blocking"];
break;
case EBrowserType.Edge:
case EBrowserType.Chrome:
default:
opt_extraInfoSpec = ["requestHeaders", "blocking", "extraHeaders"];
break;
case EBrowserType.Firefox:
opt_extraInfoSpec = ["requestHeaders", "blocking"];
break;
}

chrome.webRequest.onBeforeSendHeaders.addListener(
Expand All @@ -638,9 +639,7 @@ export default class PTPlugin {
},
{
urls: ["<all_urls>"]
},opt_extraInfoSpec
);

}, opt_extraInfoSpec);
}

/**
Expand Down

0 comments on commit 4ce8bb9

Please sign in to comment.