summaryrefslogtreecommitdiff
path: root/src/bg/RequestGuard.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/bg/RequestGuard.js')
-rw-r--r--src/bg/RequestGuard.js4
1 files changed, 2 insertions, 2 deletions
diff --git a/src/bg/RequestGuard.js b/src/bg/RequestGuard.js
index e6be19e..db34f4b 100644
--- a/src/bg/RequestGuard.js
+++ b/src/bg/RequestGuard.js
@@ -364,7 +364,7 @@ var RequestGuard = (() => {
return ALLOW;
},
- onHeadersReceived(request) {
+ async onHeadersReceived(request) {
// called for main_frame, sub_frame and object
// check for duplicate calls
@@ -389,12 +389,12 @@ var RequestGuard = (() => {
}
}
-
if (ns.isEnforced(tabId)) {
let policy = ns.policy;
let perms = policy.get(url, documentUrl).perms;
if (policy.autoAllowTop && request.type === "main_frame" && perms === policy.DEFAULT) {
policy.set(Sites.optimalKey(url), perms = policy.TRUSTED.tempTwin);
+ await ChildPolicies.update(policy);
}
let {capabilities} = perms;