Unexpected behavior dynamic declarativeNetRequest

115 views
Skip to first unread message

Pavel Aronovich

unread,
Jul 11, 2024, 12:28:48 PMJul 11
to Chromium Extensions
Hi,

I found unexpected behavior, there is the following rule for chrome.declarativeNetRequest.updateDynamicRules:

    rules.push({
      id: xxx,
      condition: {
        initiatorDomains: [chrome.runtime.id],
        resourceTypes: ["sub_frame"]
      },
      action: {
        type: "modifyHeaders",
        responseHeaders: [
          { header: "X-Frame-Options", operation: "remove" }
        ]
      }
    });

I expect that the rule will only work for requests coming from the extension. But in fact, in a corporate environment, this rule "works" for sites that open in the browser. Because we see that some sites are not working correctly, they have problems with frames. There is an assumption that this behavior is influenced by some kind of policy, but it was not possible to determine which one. As a result, after deleting this rule, the problem disappeared. But why do we observe this behavior?

Regards, Pavel.

Pavel Aronovich

unread,
Jul 11, 2024, 12:30:16 PMJul 11
to Chromium Extensions, Pavel Aronovich
The extension is installed using the ExtensionSettings policy.

четверг, 11 июля 2024 г. в 19:28:48 UTC+3, Pavel Aronovich:
Reply all
Reply to author
Forward
0 new messages