mirror of
https://github.com/matrix-org/dendrite
synced 2024-12-13 22:13:15 +01:00
Use non http API as fsAPI to avoid network requests (#2075)
Signed-off-by: Till Faelligen <tfaelligen@gmail.com>
This commit is contained in:
parent
640ba425e2
commit
a47b12dc7d
1 changed files with 3 additions and 4 deletions
|
@ -23,10 +23,10 @@ import (
|
|||
func FederationAPI(base *basepkg.BaseDendrite, cfg *config.Dendrite) {
|
||||
userAPI := base.UserAPIClient()
|
||||
federation := base.CreateFederationClient()
|
||||
fsAPI := base.FederationAPIHTTPClient()
|
||||
keyRing := fsAPI.KeyRing()
|
||||
rsAPI := base.RoomserverHTTPClient()
|
||||
keyAPI := base.KeyServerHTTPClient()
|
||||
fsAPI := federationapi.NewInternalAPI(base, federation, rsAPI, base.Caches, nil, true)
|
||||
keyRing := fsAPI.KeyRing()
|
||||
|
||||
federationapi.AddPublicRoutes(
|
||||
base.PublicFederationAPIMux, base.PublicKeyAPIMux, base.PublicWellKnownAPIMux,
|
||||
|
@ -35,8 +35,7 @@ func FederationAPI(base *basepkg.BaseDendrite, cfg *config.Dendrite) {
|
|||
&base.Cfg.MSCs, nil,
|
||||
)
|
||||
|
||||
intAPI := federationapi.NewInternalAPI(base, federation, rsAPI, base.Caches, nil, true)
|
||||
federationapi.AddInternalRoutes(base.InternalAPIMux, intAPI)
|
||||
federationapi.AddInternalRoutes(base.InternalAPIMux, fsAPI)
|
||||
|
||||
base.SetupAndServeHTTP(
|
||||
base.Cfg.FederationAPI.InternalAPI.Listen,
|
||||
|
|
Loading…
Reference in a new issue