mirror of
https://github.com/avwo/whistle.git
synced 2026-10-29 15:09:28 +08:00
feat: Use wildcard certificates first
This commit is contained in:
+3
-2
@@ -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;
|
||||
};
|
||||
|
||||
|
||||
Reference in New Issue
Block a user