diff options
Diffstat (limited to 'src')
-rw-r--r-- | src/bg/ChildPolicies.js | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/src/bg/ChildPolicies.js b/src/bg/ChildPolicies.js index 67c0c81..f3845bd 100644 --- a/src/bg/ChildPolicies.js +++ b/src/bg/ChildPolicies.js @@ -92,11 +92,15 @@ patterns.map(p => p.replace(rx, (m, host) => tld.isIp(host) ? m : m + ".") ).filter(validMatchPattern) ); - } + }; + + let extraProtocols = patterns => patterns.concat( + patterns.filter(p => p.startsWith("*://")) + .map(p => p.replace("*", "ftp"))); let siteKeys2MatchPatterns = keys => keys ? [... new Set( - withFQDNs(flatten(keys.map(siteKey2MatchPattern)).filter(p => !!p)))] + extraProtocols(withFQDNs(flatten(keys.map(siteKey2MatchPattern)).filter(p => !!p))))] : []; var ChildPolicies = { |