3
0
mirror of https://github.com/ergochat/ergo.git synced 2024-11-10 22:19:31 +01:00

Fix some config loading issues

This commit is contained in:
Daniel Oaks 2018-01-28 10:52:07 +10:00
parent 3fa767e3f3
commit cabb3b219d

View File

@ -128,7 +128,7 @@ type STSConfig struct {
// Value returns the STS value to advertise in CAP
func (sts *STSConfig) Value() string {
val := fmt.Sprintf("duration=%d,", int(sts.Duration.Seconds()))
val := fmt.Sprintf("duration=%d", int(sts.Duration.Seconds()))
if sts.Enabled && sts.Port > 0 {
val += fmt.Sprintf(",port=%d", sts.Port)
}
@ -348,10 +348,10 @@ func (conf *Config) TLSListeners() map[string]*tls.Config {
tlsListeners := make(map[string]*tls.Config)
for s, tlsListenersConf := range conf.Server.TLSListeners {
config, err := tlsListenersConf.Config()
config.ClientAuth = tls.RequestClientCert
if err != nil {
log.Fatal(err)
}
config.ClientAuth = tls.RequestClientCert
tlsListeners[s] = config
}
return tlsListeners