Block CSP violation reports requests synchronously, before they fail on .invalid DNS resolution, on Chromium.
This commit is contained in:
parent
c245237c96
commit
3bf8e29a9a
|
@ -435,7 +435,7 @@ var RequestGuard = (() => {
|
|||
type,
|
||||
});
|
||||
}
|
||||
async function onViolationReport(request) {
|
||||
function onViolationReport(request) {
|
||||
try {
|
||||
let decoder = new TextDecoder("UTF-8");
|
||||
const report = JSON.parse(decoder.decode(request.requestBody.raw[0].bytes))['csp-report'];
|
||||
|
|
Loading…
Reference in New Issue