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:
parent
3fa767e3f3
commit
cabb3b219d
@ -128,7 +128,7 @@ type STSConfig struct {
|
|||||||
|
|
||||||
// Value returns the STS value to advertise in CAP
|
// Value returns the STS value to advertise in CAP
|
||||||
func (sts *STSConfig) Value() string {
|
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 {
|
if sts.Enabled && sts.Port > 0 {
|
||||||
val += fmt.Sprintf(",port=%d", sts.Port)
|
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)
|
tlsListeners := make(map[string]*tls.Config)
|
||||||
for s, tlsListenersConf := range conf.Server.TLSListeners {
|
for s, tlsListenersConf := range conf.Server.TLSListeners {
|
||||||
config, err := tlsListenersConf.Config()
|
config, err := tlsListenersConf.Config()
|
||||||
config.ClientAuth = tls.RequestClientCert
|
|
||||||
if err != nil {
|
if err != nil {
|
||||||
log.Fatal(err)
|
log.Fatal(err)
|
||||||
}
|
}
|
||||||
|
config.ClientAuth = tls.RequestClientCert
|
||||||
tlsListeners[s] = config
|
tlsListeners[s] = config
|
||||||
}
|
}
|
||||||
return tlsListeners
|
return tlsListeners
|
||||||
|
Loading…
Reference in New Issue
Block a user