Disallow the blanket wildcard prefix from being used as custom host

This commit is contained in:
Kyle Havlovitz 2020-05-08 19:50:49 -07:00
parent 3931015a90
commit dc1112eaf8
1 changed files with 4 additions and 0 deletions

View File

@ -190,6 +190,10 @@ func validateHost(host string) error {
return fmt.Errorf("Host %q is not valid, a wildcard specifier is only allowed as the leftmost label", host)
}
if host == "*" {
return fmt.Errorf("Host '*' is not allowed, wildcards can only be used as a prefix/suffix")
}
return nil
}