Add consentAPIMux to components

This commit is contained in:
Till Faelligen 2022-02-14 13:00:07 +01:00
parent 5702b84dae
commit ccc11f94f7
9 changed files with 9 additions and 1 deletions

View file

@ -349,6 +349,7 @@ func (m *DendriteMonolith) Start() {
base.PublicWellKnownAPIMux, base.PublicWellKnownAPIMux,
base.PublicMediaAPIMux, base.PublicMediaAPIMux,
base.SynapseAdminMux, base.SynapseAdminMux,
base.PublicConsentAPIMux,
) )
httpRouter := mux.NewRouter().SkipClean(true).UseEncodedPath() httpRouter := mux.NewRouter().SkipClean(true).UseEncodedPath()

View file

@ -156,6 +156,7 @@ func (m *DendriteMonolith) Start() {
base.PublicWellKnownAPIMux, base.PublicWellKnownAPIMux,
base.PublicMediaAPIMux, base.PublicMediaAPIMux,
base.SynapseAdminMux, base.SynapseAdminMux,
base.PublicConsentAPIMux,
) )
httpRouter := mux.NewRouter() httpRouter := mux.NewRouter()

View file

@ -194,6 +194,7 @@ func main() {
base.Base.PublicWellKnownAPIMux, base.Base.PublicWellKnownAPIMux,
base.Base.PublicMediaAPIMux, base.Base.PublicMediaAPIMux,
base.Base.SynapseAdminMux, base.Base.SynapseAdminMux,
base.Base.PublicConsentAPIMux,
) )
if err := mscs.Enable(&base.Base, &monolith); err != nil { if err := mscs.Enable(&base.Base, &monolith); err != nil {
logrus.WithError(err).Fatalf("Failed to enable MSCs") logrus.WithError(err).Fatalf("Failed to enable MSCs")

View file

@ -222,6 +222,7 @@ func main() {
base.PublicWellKnownAPIMux, base.PublicWellKnownAPIMux,
base.PublicMediaAPIMux, base.PublicMediaAPIMux,
base.SynapseAdminMux, base.SynapseAdminMux,
base.PublicConsentAPIMux,
) )
wsUpgrader := websocket.Upgrader{ wsUpgrader := websocket.Upgrader{

View file

@ -147,6 +147,7 @@ func main() {
base.PublicWellKnownAPIMux, base.PublicWellKnownAPIMux,
base.PublicMediaAPIMux, base.PublicMediaAPIMux,
base.SynapseAdminMux, base.SynapseAdminMux,
base.PublicConsentAPIMux,
) )
if err := mscs.Enable(base, &monolith); err != nil { if err := mscs.Enable(base, &monolith); err != nil {
logrus.WithError(err).Fatalf("Failed to enable MSCs") logrus.WithError(err).Fatalf("Failed to enable MSCs")

View file

@ -164,6 +164,7 @@ func main() {
base.PublicWellKnownAPIMux, base.PublicWellKnownAPIMux,
base.PublicMediaAPIMux, base.PublicMediaAPIMux,
base.SynapseAdminMux, base.SynapseAdminMux,
base.PublicConsentAPIMux,
) )
if len(base.Cfg.MSCs.MSCs) > 0 { if len(base.Cfg.MSCs.MSCs) > 0 {

View file

@ -33,7 +33,7 @@ func ClientAPI(base *basepkg.BaseDendrite, cfg *config.Dendrite) {
keyAPI := base.KeyServerHTTPClient() keyAPI := base.KeyServerHTTPClient()
clientapi.AddPublicRoutes( clientapi.AddPublicRoutes(
base.PublicClientAPIMux, base.SynapseAdminMux, &base.Cfg.ClientAPI, accountDB, federation, base.PublicClientAPIMux, base.SynapseAdminMux, base.PublicConsentAPIMux, &base.Cfg.ClientAPI, accountDB, federation,
rsAPI, eduInputAPI, asQuery, transactions.New(), fsAPI, userAPI, keyAPI, nil, rsAPI, eduInputAPI, asQuery, transactions.New(), fsAPI, userAPI, keyAPI, nil,
&cfg.MSCs, &cfg.MSCs,
) )

View file

@ -224,6 +224,7 @@ func startup() {
base.PublicWellKnownAPIMux, base.PublicWellKnownAPIMux,
base.PublicMediaAPIMux, base.PublicMediaAPIMux,
base.SynapseAdminMux, base.SynapseAdminMux,
base.PublicConsentAPIMux,
) )
httpRouter := mux.NewRouter().SkipClean(true).UseEncodedPath() httpRouter := mux.NewRouter().SkipClean(true).UseEncodedPath()

View file

@ -236,6 +236,7 @@ func main() {
base.PublicKeyAPIMux, base.PublicKeyAPIMux,
base.PublicMediaAPIMux, base.PublicMediaAPIMux,
base.SynapseAdminMux, base.SynapseAdminMux,
base.PublicConsentAPIMux,
) )
httpRouter := mux.NewRouter().SkipClean(true).UseEncodedPath() httpRouter := mux.NewRouter().SkipClean(true).UseEncodedPath()