mirror of
https://github.com/ergochat/ergo.git
synced 2024-11-25 13:29:27 +01:00
Fix some config loading issues
This commit is contained in:
parent
3fa767e3f3
commit
cabb3b219d
@ -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
|
||||
|
Loading…
Reference in New Issue
Block a user