DNS记录名支持下划线

This commit is contained in:
GoEdgeLab
2021-10-25 09:05:26 +08:00
parent c0a01ac68c
commit 014dcc809f

View File

@@ -77,7 +77,7 @@ func ValidateRecordName(name string) bool {
strings.HasSuffix(piece, "-") ||
strings.Contains(piece, "--") ||
len(piece) > 63 ||
!regexp.MustCompile(`^[a-z0-9-]+$`).MatchString(piece) {
!regexp.MustCompile(`^[_a-z0-9-]+$`).MatchString(piece) {
return false
}
}