Block CSP violation reports requests synchronously, before they fail on .invalid DNS resolution, on Chromium.

This commit is contained in:
hackademix 2019-09-29 00:42:26 +02:00
parent c245237c96
commit 3bf8e29a9a
1 changed files with 1 additions and 1 deletions

View File

@ -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'];