Merge current v2.9 into v3.0
This commit is contained in:
commit
241fb5093a
18 changed files with 386 additions and 116 deletions
|
@ -67,7 +67,7 @@ func clientIP(tree *matchersTree, clientIP ...string) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
var almostFQDN = regexp.MustCompile(`^[[:alnum:]\.-]+$`)
|
||||
var hostOrIP = regexp.MustCompile(`^[[:alnum:]\.\-\:]+$`)
|
||||
|
||||
// hostSNI checks if the SNI Host of the connection match the matcher host.
|
||||
func hostSNI(tree *matchersTree, hosts ...string) error {
|
||||
|
@ -80,7 +80,7 @@ func hostSNI(tree *matchersTree, hosts ...string) error {
|
|||
return nil
|
||||
}
|
||||
|
||||
if !almostFQDN.MatchString(host) {
|
||||
if !hostOrIP.MatchString(host) {
|
||||
return fmt.Errorf("invalid value for HostSNI matcher, %q is not a valid hostname", host)
|
||||
}
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue