dendrite/setup/config/config_monolith.go
Timo Rothenpieler 77c7aaaf13 Add Monolith HTTPS listener TLS config options
Signed-off-by: Timo Rothenpieler <timo@rothenpieler.org>
2022-11-23 15:16:25 +01:00

26 lines
658 B
Go

package config
type Monolith struct {
HTTPBindAddr HTTPAddress `yaml:"http_bind_address"`
HTTPSBindAddr HTTPAddress `yaml:"https_bind_address"`
TlsCertificatePath Path `yaml:"tls_cert_path"`
TlsPrivateKeyPath Path `yaml:"tls_key_path"`
}
func (c *Monolith) Defaults(opts DefaultOpts) {
if !opts.Monolithic {
return
}
c.HTTPBindAddr = "http://:8008"
c.HTTPSBindAddr = "https://:8448"
}
func (c *Monolith) Verify(configErrs *ConfigErrors, isMonolith bool) {
if !isMonolith {
return
}
checkURL(configErrs, "monolith.http_bind_address", string(c.HTTPBindAddr))
checkURL(configErrs, "monolith.https_bind_address", string(c.HTTPSBindAddr))
}