Additional fixes
CI / test (pull_request) Successful in 5m42s

This commit is contained in:
kfj001 committed 2026-08-28 18:03:14 +00:00
1 parent d3c8c85c58
commit 7b43d260a2
3 files changed
+25 -10

No files matched your search

+3 -2
View File
@@ -315,7 +315,8 @@ function originFromHost(host) {
}
// Read the `Referer` request header (the browser may title-case it; the
// `extraHeaders` option exposes it to MV3 onBeforeSendHeaders).
// (onBeforeSendHeaders cannot read request headers in MV3 without a blocking API,
// so we fall back to the page origin for hosts that send no referer).
function readReferer(headers) {
if (!Array.isArray(headers)) return '';
for (const h of headers) {
@@ -385,7 +386,7 @@ chrome.webRequest.onBeforeSendHeaders.addListener(
await persistReferer(host, originFromHost(host));
}
},
{ urls: ['<all_urls>'], extraHeaders: ['Referer'] }
{ urls: ['<all_urls>'] }
);
// Install (idempotently) a DNR rule that sets the captured referer for a given