We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent ab705e3 commit 7993f46Copy full SHA for 7993f46
src/content/content.js
@@ -157,11 +157,12 @@ window.addEventListener("securitypolicyviolation", async e => {
157
} else {
158
({origin} = new URL(url));
159
}
160
- const key = RequestKey.create(url, type, documentOrigin);
+ const reportUrl = /frame|object|media/.test(type) ? url : origin;
161
+ const key = RequestKey.create(reportUrl, type, documentOrigin);
162
if (violations.has(key)) return;
163
violations.add(key);
164
if (type === "frame") type = "sub_frame";
- Messages.send("violation", {url, type, isReport});
165
+ Messages.send("violation", {url: reportUrl, type, isReport});
166
}, true);
167
168
if (!/^https:/.test(location.protocol)) {
0 commit comments