mirror of
https://github.com/matrix-org/dendrite.git
synced 2026-01-06 13:43:09 -06:00
Fix monolith in -http mode
This commit is contained in:
parent
4705f5761e
commit
3b95adcbae
|
|
@ -89,6 +89,7 @@ func main() {
|
||||||
fsAPI := federationapi.NewInternalAPI(
|
fsAPI := federationapi.NewInternalAPI(
|
||||||
base, federation, rsAPI, base.Caches, nil, false,
|
base, federation, rsAPI, base.Caches, nil, false,
|
||||||
)
|
)
|
||||||
|
fsImplAPI := fsAPI
|
||||||
if base.UseHTTPAPIs {
|
if base.UseHTTPAPIs {
|
||||||
federationapi.AddInternalRoutes(base.InternalAPIMux, fsAPI)
|
federationapi.AddInternalRoutes(base.InternalAPIMux, fsAPI)
|
||||||
fsAPI = base.FederationAPIHTTPClient()
|
fsAPI = base.FederationAPIHTTPClient()
|
||||||
|
|
@ -138,7 +139,10 @@ func main() {
|
||||||
FedClient: federation,
|
FedClient: federation,
|
||||||
KeyRing: keyRing,
|
KeyRing: keyRing,
|
||||||
|
|
||||||
AppserviceAPI: asAPI, FederationAPI: fsAPI,
|
AppserviceAPI: asAPI,
|
||||||
|
// always use the concrete impl here even in -http mode because adding public routes
|
||||||
|
// must be done on the concrete impl not an HTTP client else fedapi will call itself
|
||||||
|
FederationAPI: fsImplAPI,
|
||||||
RoomserverAPI: rsAPI,
|
RoomserverAPI: rsAPI,
|
||||||
UserAPI: userAPI,
|
UserAPI: userAPI,
|
||||||
KeyAPI: keyAPI,
|
KeyAPI: keyAPI,
|
||||||
|
|
|
||||||
Loading…
Reference in a new issue