1
0
Fork 0
forked from External/ergo

more permissive hostname validation

In particular, allow hostnames without periods (like on a LAN).
This shouldn't be a client compability concern since we allow
vhosts without periods.
This commit is contained in:
Shivaram Lingamneni 2019-12-18 09:21:45 -05:00
parent 4b37b5dd3e
commit f1e2bbc0e4
3 changed files with 28 additions and 12 deletions

View file

@ -593,7 +593,7 @@ func LoadConfig(filename string) (config *Config, err error) {
if config.Server.Name == "" {
return nil, ErrServerNameMissing
}
if !utils.IsHostname(config.Server.Name) {
if !utils.IsServerName(config.Server.Name) {
return nil, ErrServerNameNotHostname
}
if config.Datastore.Path == "" {