1
0
Fork 0
mirror of https://github.com/mozilla/pdf.js.git synced 2025-04-19 06:38:07 +02:00

[CRX] Fix feature detect of DNR responseHeaders option

Fix regression from #18711. `urlFilter` is a key of `condition`, not of
the `rule`. Consequently, the feature detection method failed to detect
the availability of the feature in Chrome 128+.
This commit is contained in:
Rob Wu 2024-09-10 16:00:13 +02:00
parent 66ed4b9e25
commit a91ba11185

View file

@ -227,8 +227,10 @@ async function isHeaderConditionSupported() {
addRules: [ addRules: [
{ {
id: ruleId, id: ruleId,
urlFilter: "|does_not_match_anything", condition: {
condition: { responseHeaders: [{ header: "whatever" }] }, responseHeaders: [{ header: "whatever" }],
urlFilter: "|does_not_match_anything",
},
action: { type: "block" }, action: { type: "block" },
}, },
], ],
@ -244,8 +246,10 @@ async function isHeaderConditionSupported() {
addRules: [ addRules: [
{ {
id: ruleId, id: ruleId,
urlFilter: "|does_not_match_anything", condition: {
condition: { responseHeaders: [] }, responseHeaders: [],
urlFilter: "|does_not_match_anything",
},
action: { type: "block" }, action: { type: "block" },
}, },
], ],