From 03d041ce03f630d2a28494946ae71588e36d257d Mon Sep 17 00:00:00 2001 From: Wojtek Kosior Date: Fri, 3 Sep 2021 18:46:26 +0200 Subject: only apply stream filter modifications when reasonably necessary --- background/main.js | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) (limited to 'background/main.js') diff --git a/background/main.js b/background/main.js index 85f8ce8..2e9fa50 100644 --- a/background/main.js +++ b/background/main.js @@ -57,9 +57,10 @@ function on_headers_received(details) return; const [pattern, settings] = query_best(storage, details.url); - const allow = !!(settings && settings.allow); + const has_payload = !!(settings && settings.components); + const allow = !has_payload && !!(settings && settings.allow); const nonce = gen_nonce(); - const policy = {allow, url, nonce}; + const policy = {allow, url, nonce, has_payload}; let headers = details.responseHeaders; let skip = false; -- cgit v1.2.3