mirror of
https://github.com/caddyserver/caddy.git
synced 2024-11-25 17:56:34 +08:00
tls: Try empty name if no matches for getting config during handshake
See discussion on #2015; the initial change had removed this check, and I can't remember why I removed it or if it was accidental. Anyway, it's back now.
This commit is contained in:
parent
be96cc0e65
commit
896dc6bc69
|
@ -59,6 +59,14 @@ func (cg configGroup) getConfig(name string) *Config {
|
|||
}
|
||||
}
|
||||
|
||||
// try a config that serves all names (this
|
||||
// is basically the same as a config defined
|
||||
// for "*" -- I think -- but the above loop
|
||||
// doesn't try an empty string)
|
||||
if config, ok := cg[""]; ok {
|
||||
return config
|
||||
}
|
||||
|
||||
// no matches, so just serve up a random config
|
||||
for _, config := range cg {
|
||||
return config
|
||||
|
|
Loading…
Reference in New Issue
Block a user