mirror of
https://github.com/TeaOSLab/EdgeAdmin.git
synced 2025-11-07 15:20:25 +08:00
DNS记录名支持下划线
This commit is contained in:
@@ -77,7 +77,7 @@ func ValidateRecordName(name string) bool {
|
|||||||
strings.HasSuffix(piece, "-") ||
|
strings.HasSuffix(piece, "-") ||
|
||||||
strings.Contains(piece, "--") ||
|
strings.Contains(piece, "--") ||
|
||||||
len(piece) > 63 ||
|
len(piece) > 63 ||
|
||||||
!regexp.MustCompile(`^[a-z0-9-]+$`).MatchString(piece) {
|
!regexp.MustCompile(`^[_a-z0-9-]+$`).MatchString(piece) {
|
||||||
return false
|
return false
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user