diff options
author | Erik Johnston <erikj@jki.re> | 2019-02-27 15:30:40 +0000 |
---|---|---|
committer | GitHub <noreply@github.com> | 2019-02-27 15:30:40 +0000 |
commit | 46b0151524cbc19bfe8091bb88bc29267c965c29 (patch) | |
tree | 0669a97dc7b6a5099a7cc9034c762365c7bf30ff /synapse | |
parent | Merge pull request #4749 from matrix-org/erikj/replication_connection_backoff (diff) | |
parent | Fix unit tests (diff) | |
download | synapse-46b0151524cbc19bfe8091bb88bc29267c965c29.tar.xz |
Merge pull request #4757 from matrix-org/erikj/key_api_fed_readae
Move server key queries to federation reader
Diffstat (limited to 'synapse')
-rw-r--r-- | synapse/app/federation_reader.py | 6 |
1 files changed, 5 insertions, 1 deletions
diff --git a/synapse/app/federation_reader.py b/synapse/app/federation_reader.py index b116c17669..7da79dc827 100644 --- a/synapse/app/federation_reader.py +++ b/synapse/app/federation_reader.py @@ -21,7 +21,7 @@ from twisted.web.resource import NoResource import synapse from synapse import events -from synapse.api.urls import FEDERATION_PREFIX +from synapse.api.urls import FEDERATION_PREFIX, SERVER_KEY_V2_PREFIX from synapse.app import _base from synapse.config._base import ConfigError from synapse.config.homeserver import HomeServerConfig @@ -44,6 +44,7 @@ from synapse.replication.slave.storage.registration import SlavedRegistrationSto from synapse.replication.slave.storage.room import RoomStore from synapse.replication.slave.storage.transactions import SlavedTransactionStore from synapse.replication.tcp.client import ReplicationClientHandler +from synapse.rest.key.v2 import KeyApiV2Resource from synapse.server import HomeServer from synapse.storage.engines import create_engine from synapse.util.httpresourcetree import create_resource_tree @@ -99,6 +100,9 @@ class FederationReaderServer(HomeServer): ), }) + if name in ["keys", "federation"]: + resources[SERVER_KEY_V2_PREFIX] = KeyApiV2Resource(self) + root_resource = create_resource_tree(resources, NoResource()) _base.listen_tcp( |