Skip to content

Commit 82bed35

Browse files
committed
Limit fix for issue #41 to origin-less fetch (exclude frames).
1 parent d93c879 commit 82bed35

File tree

1 file changed

+3
-2
lines changed

1 file changed

+3
-2
lines changed

src/bg/RequestGuard.js

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -263,8 +263,9 @@ var RequestGuard = (() => {
263263
let policyType = policyTypesMap[request.type];
264264
if (policyType) {
265265
let {url, originUrl, documentUrl} = request;
266-
if (("fetch" === policyType || "frame" === policyType) &&
267-
(((!originUrl || url === originUrl) && originUrl === documentUrl
266+
let isFetch = "fetch" === policyType;
267+
if ((isFetch || "frame" === policyType) &&
268+
(((isFetch && !originUrl || url === originUrl) && originUrl === documentUrl
268269
// some extensions make them both undefined,
269270
// see https://github.com/eight04/image-picka/issues/150
270271
) ||

0 commit comments

Comments
 (0)