mirror of
https://github.com/TeaOSLab/EdgeAPI.git
synced 2025-11-08 19:40:24 +08:00
v1.4.1
This commit is contained in:
@@ -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) {
|
||||
|
||||
Reference in New Issue
Block a user