mirror of
https://github.com/netbirdio/netbird.git
synced 2026-04-22 18:26:41 +00:00
dynamic regex
This commit is contained in:
@@ -2,7 +2,6 @@ package server
|
||||
|
||||
import (
|
||||
"context"
|
||||
"strings"
|
||||
"unicode/utf8"
|
||||
|
||||
"github.com/rs/xid"
|
||||
@@ -263,10 +262,7 @@ func validateDomainInput(primary bool, domains []string, searchDomainsEnabled bo
|
||||
}
|
||||
|
||||
for _, domain := range domains {
|
||||
if strings.HasPrefix(domain, "*") {
|
||||
return status.Errorf(status.InvalidArgument, "wildcard prefix is not allowed: %s", domain)
|
||||
}
|
||||
if !nbDomain.IsValidDomain(domain) {
|
||||
if !nbDomain.IsValidDomain(domain, false, true) {
|
||||
return status.Errorf(status.InvalidArgument, "nameserver group got an invalid domain: %s", domain)
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user