GM XHR header处理
Some checks failed
test / Run tests (push) Failing after 11s
build / Build (push) Failing after 23s

This commit is contained in:
2025-03-11 17:50:46 +08:00
parent 6d983ed0e4
commit 99e33c18f6
3 changed files with 46 additions and 26 deletions

View File

@ -0,0 +1,6 @@
export function isExtensionRequest(details: chrome.webRequest.ResourceRequest & { originUrl?: string }): boolean {
return !!(
(details.initiator && chrome.runtime.getURL("").startsWith(details.initiator)) ||
(details.originUrl && details.originUrl.startsWith(chrome.runtime.getURL("")))
);
}