summaryrefslogtreecommitdiff
path: root/src/common
diff options
context:
space:
mode:
authorhackademix2018-09-10 19:10:32 +0200
committerhackademix2018-09-10 19:10:32 +0200
commit48053d96d44abbfa3c659e5fc817d998dda2bb35 (patch)
treee7c8b36edf2db7544c5e8fd543f6e28579e315a8 /src/common
parent2b45fcb9a42c0acb2f5a88338c67244ae6c4fb8f (diff)
downloadnoscript-48053d96d44abbfa3c659e5fc817d998dda2bb35.tar.gz
noscript-48053d96d44abbfa3c659e5fc817d998dda2bb35.tar.xz
noscript-48053d96d44abbfa3c659e5fc817d998dda2bb35.zip
Better IPV6 support.
Diffstat (limited to 'src/common')
-rw-r--r--src/common/Policy.js2
1 files changed, 1 insertions, 1 deletions
diff --git a/src/common/Policy.js b/src/common/Policy.js
index 37bd164..55e9ad1 100644
--- a/src/common/Policy.js
+++ b/src/common/Policy.js
@@ -11,7 +11,7 @@ var {Permissions, Policy, Sites} = (() => {
class Sites extends Map {
static secureDomainKey(domain) {
- return domain.includes(":") ? domain : `${SECURE_DOMAIN_PREFIX}${domain}`;
+ return /^[ยง\w]+:/.test(domain) ? domain : `${SECURE_DOMAIN_PREFIX}${domain}`;
}
static isSecureDomainKey(domain) {
return domain.startsWith(SECURE_DOMAIN_PREFIX);