update host regexp
@@ -200,9 +200,7 @@ const validateHostWithWildcardPrefix = (value: string) => {
}
var regResultIp = regExpIp.exec(value);
- var regExpHostname = new RegExp(
- /^(\*\.)?(([a-zA-Z0-9]|[a-zA-Z0-9][a-zA-Z0-9-]*[a-zA-Z0-9])\.)*([A-Za-z0-9]|[A-Za-z0-9][A-Za-z0-9-]*[A-Za-z0-9])$/,
- ); // RFC 1123 but allow "*." prefix
+ var regExpHostname = new RegExp(/^[a-zA-Z0-9][a-zA-Z0-9-]{1,61}[a-zA-Z0-9](?:\.[a-zA-Z]{2,})+/); // RFC 1123 but allow "*." prefix
var regResultHostname = regExpHostname.exec(value);
if (regResultIp === null && regResultHostname === null) {
