Skip to content

Commit

Permalink
[CRX] Fix feature detect of DNR responseHeaders option
Browse files Browse the repository at this point in the history
Fix regression from mozilla#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+.
  • Loading branch information
Rob--W committed Sep 10, 2024
1 parent 66ed4b9 commit a91ba11
Showing 1 changed file with 8 additions and 4 deletions.
12 changes: 8 additions & 4 deletions extensions/chromium/pdfHandler.js
Original file line number Diff line number Diff line change
Expand Up @@ -227,8 +227,10 @@ async function isHeaderConditionSupported() {
addRules: [
{
id: ruleId,
urlFilter: "|does_not_match_anything",
condition: { responseHeaders: [{ header: "whatever" }] },
condition: {
responseHeaders: [{ header: "whatever" }],
urlFilter: "|does_not_match_anything",
},
action: { type: "block" },
},
],
Expand All @@ -244,8 +246,10 @@ async function isHeaderConditionSupported() {
addRules: [
{
id: ruleId,
urlFilter: "|does_not_match_anything",
condition: { responseHeaders: [] },
condition: {
responseHeaders: [],
urlFilter: "|does_not_match_anything",
},
action: { type: "block" },
},
],
Expand Down

0 comments on commit a91ba11

Please sign in to comment.