Skip to content

Commit 83979c5

Browse files
committed
Allow extensions to perform origin-less fetching and framing (issue #41).
1 parent 1dcbc7e commit 83979c5

File tree

1 file changed

+4
-1
lines changed

1 file changed

+4
-1
lines changed

src/bg/RequestGuard.js

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -264,7 +264,10 @@ var RequestGuard = (() => {
264264
if (policyType) {
265265
let {url, originUrl, documentUrl} = request;
266266
if (("fetch" === policyType || "frame" === policyType) &&
267-
(url === originUrl && originUrl === documentUrl ||
267+
(((!originUrl || url === originUrl) && originUrl === documentUrl
268+
// some extensions make them both undefined,
269+
// see https://github.com/eight04/image-picka/issues/150
270+
) ||
268271
INTERNAL_SCHEME.test(originUrl))
269272
) {
270273
// livemark request or similar browser-internal, always allow;

0 commit comments

Comments
 (0)