summaryrefslogtreecommitdiff
path: root/src/common/Policy.js
diff options
context:
space:
mode:
Diffstat (limited to 'src/common/Policy.js')
-rw-r--r--src/common/Policy.js3
1 files changed, 1 insertions, 2 deletions
diff --git a/src/common/Policy.js b/src/common/Policy.js
index 3c31c71..9afc92e 100644
--- a/src/common/Policy.js
+++ b/src/common/Policy.js
@@ -29,12 +29,11 @@ var {Permissions, Policy, Sites} = (() => {
}
static domainImplies(domainKey, site, protocol ="https?") {
- if (!site.includes(domainKey)) return false;
-
if (Sites.isSecureDomainKey(domainKey)) {
protocol = "https";
domainKey = Sites.toggleSecureDomainKey(domainKey, false);
}
+ if (!site.includes(domainKey)) return false;
try {
return new RegExp(`^${protocol}://([^/?#:]+\\.)?${rxQuote(domainKey)}(?:[:/]|$)`)
.test(site);