This commit is contained in:
GoEdgeLab
2024-07-27 14:15:25 +08:00
parent be70925770
commit 5a17ae9d79
520 changed files with 2515 additions and 762 deletions

View File

@@ -1,4 +1,4 @@
// Copyright 2023 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cn .
// Copyright 2023 GoEdge CDN goedge.cdn@gmail.com. All rights reserved. Official site: https://goedge.cloud .
package domainutils
@@ -14,7 +14,7 @@ func ValidateDomainFormat(domain string) bool {
if piece == "-" ||
strings.HasPrefix(piece, "-") ||
strings.HasSuffix(piece, "-") ||
//strings.Contains(piece, "--") ||
// strings.Contains(piece, "--") ||
len(piece) > 63 ||
// 支持中文、大写字母、下划线
!regexp.MustCompile(`^[\p{Han}_a-zA-Z0-9-]+$`).MatchString(piece) {