feat: Use wildcard certificates first

This commit is contained in:
avwo
2017-12-09 02:41:42 +08:00
parent a87d559d5b
commit c8d25cb1fd
+3 -2
View File
@@ -76,10 +76,11 @@ exports.getDomain = function(hostname) {
if (len < 3) {
return hostname;
}
if (len > 3 || ILEGAL_CHAR_RE.test(prefix)
|| list[1].length > 3 || list[2] === 'com') {
if (len > 3 || ILEGAL_CHAR_RE.test(prefix) || list[1].length > 3
|| list[2] === 'com' || (list[2] === 'cn' && list[1] === 'url')) {
return wildDomain;
}
return hostname;
};