From 48053d96d44abbfa3c659e5fc817d998dda2bb35 Mon Sep 17 00:00:00 2001 From: hackademix Date: Mon, 10 Sep 2018 19:10:32 +0200 Subject: Better IPV6 support. --- src/common/Policy.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) (limited to 'src/common/Policy.js') 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); -- cgit v1.2.3