diff --git a/manifest.json b/manifest.json index 406cd5e..d1dc5f0 100644 --- a/manifest.json +++ b/manifest.json @@ -7,9 +7,8 @@ "storage", "tabs", "scripting", - "webRequest", - "declarativeNetRequest", - "extraHeaders" + "webRequest", + "declarativeNetRequest" ], "host_permissions": [ "" diff --git a/package-lock.json b/package-lock.json index 6b8a017..439604c 100644 --- a/package-lock.json +++ b/package-lock.json @@ -7,6 +7,9 @@ "": { "name": "vidplex", "version": "0.1.0", + "dependencies": { + "@rollup/rollup-darwin-arm64": "^4.63.1" + }, "devDependencies": { "ajv": "^8.17.1", "ajv-formats": "^3.0.1", @@ -1335,15 +1338,13 @@ ] }, "node_modules/@rollup/rollup-darwin-arm64": { - "version": "4.60.4", - "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.60.4.tgz", - "integrity": "sha512-tua0TaJxMOB1R0V0RS1jFZ/RpURFDJIOR2A6jWwQeawuFyS4gBW+rntLRaQd0EQ4bd6Vp44Z2rXW+YYDBsj6IA==", + "version": "4.63.1", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.63.1.tgz", + "integrity": "sha512-FQNqd1lRy/0QhDk3xeRIkSBiCpXCiDnZO3YLVdcDKN1UBiKToNftCzcXYNLshmPDUMlu2TdeS8tGcsU6f3YF1Q==", "cpu": [ "arm64" ], - "dev": true, "license": "MIT", - "optional": true, "os": [ "darwin" ] @@ -3422,6 +3423,20 @@ "fsevents": "~2.3.2" } }, + "node_modules/rollup/node_modules/@rollup/rollup-darwin-arm64": { + "version": "4.60.4", + "resolved": "https://registry.npmjs.org/@rollup/rollup-darwin-arm64/-/rollup-darwin-arm64-4.60.4.tgz", + "integrity": "sha512-tua0TaJxMOB1R0V0RS1jFZ/RpURFDJIOR2A6jWwQeawuFyS4gBW+rntLRaQd0EQ4bd6Vp44Z2rXW+YYDBsj6IA==", + "cpu": [ + "arm64" + ], + "dev": true, + "license": "MIT", + "optional": true, + "os": [ + "darwin" + ] + }, "node_modules/rollup/node_modules/@types/estree": { "version": "1.0.8", "resolved": "https://registry.npmjs.org/@types/estree/-/estree-1.0.8.tgz", diff --git a/src/background/background.js b/src/background/background.js index 2ed7ad4..0052612 100644 --- a/src/background/background.js +++ b/src/background/background.js @@ -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: [''], extraHeaders: ['Referer'] } +{ urls: [''] } ); // Install (idempotently) a DNR rule that sets the captured referer for a given