记录名第一段允许通配符

This commit is contained in:
GoEdgeLab
2022-11-20 20:08:03 +08:00
parent f130d78874
commit 92d5aabfb4

View File

@@ -71,7 +71,10 @@ func ValidateRecordName(name string) bool {
}
pieces := strings.Split(name, ".")
for _, piece := range pieces {
for index, piece := range pieces {
if index == 0 && piece == "*" {
continue
}
if piece == "-" ||
strings.HasPrefix(piece, "-") ||
strings.HasSuffix(piece, "-") ||