diff --git a/setup/config/config.go b/setup/config/config.go index 404b7178b..e8984a5f4 100644 --- a/setup/config/config.go +++ b/setup/config/config.go @@ -60,6 +60,7 @@ type Dendrite struct { FederationAPI FederationAPI `yaml:"federation_api"` KeyServer KeyServer `yaml:"key_server"` MediaAPI MediaAPI `yaml:"media_api"` + PushServer PushServer `yaml:"push_server"` RoomServer RoomServer `yaml:"room_server"` SyncAPI SyncAPI `yaml:"sync_api"` UserAPI UserAPI `yaml:"user_api"` @@ -300,6 +301,7 @@ func (c *Dendrite) Defaults(generate bool) { c.FederationAPI.Defaults(generate) c.KeyServer.Defaults(generate) c.MediaAPI.Defaults(generate) + c.PushServer.Defaults(generate) c.RoomServer.Defaults(generate) c.SyncAPI.Defaults(generate) c.UserAPI.Defaults(generate) @@ -316,8 +318,8 @@ func (c *Dendrite) Verify(configErrs *ConfigErrors, isMonolith bool) { for _, c := range []verifiable{ &c.Global, &c.ClientAPI, &c.EDUServer, &c.FederationAPI, - &c.KeyServer, &c.MediaAPI, &c.RoomServer, - &c.SyncAPI, &c.UserAPI, + &c.KeyServer, &c.MediaAPI, &c.PushServer, + &c.RoomServer, &c.SyncAPI, &c.UserAPI, &c.AppServiceAPI, &c.MSCs, } { c.Verify(configErrs, isMonolith) @@ -330,6 +332,7 @@ func (c *Dendrite) Wiring() { c.FederationAPI.Matrix = &c.Global c.KeyServer.Matrix = &c.Global c.MediaAPI.Matrix = &c.Global + c.PushServer.Matrix = &c.Global c.RoomServer.Matrix = &c.Global c.SyncAPI.Matrix = &c.Global c.UserAPI.Matrix = &c.Global diff --git a/setup/config/config_pushserver.go b/setup/config/config_pushserver.go new file mode 100644 index 000000000..54d8d9944 --- /dev/null +++ b/setup/config/config_pushserver.go @@ -0,0 +1,16 @@ +package config + +type PushServer struct { + Matrix *Global `yaml:"-"` + + // DisableTLSValidation disables the validation of X.509 TLS certs + // on remote Push gateway endpoints. This is not recommended in + // production! + DisableTLSValidation bool `yaml:"disable_tls_validation"` +} + +func (c *PushServer) Defaults(generate bool) { +} + +func (c *PushServer) Verify(configErrs *ConfigErrors, isMonolith bool) { +}