diff options
author | Ayush Anand <iamayushanand@gmail.com> | 2022-08-18 19:44:47 +0530 |
---|---|---|
committer | GitHub <noreply@github.com> | 2022-08-18 15:14:47 +0100 |
commit | 22ea51faf9a29cd9b96189d1fac95eaf2cfcf4ec (patch) | |
tree | 5711a01eefa45c5ff77e33e26474e81e8b5fafad /synapse/app/homeserver.py | |
parent | Avoid blocking lazy-loading `/sync`s during partial joins (#13477) (diff) | |
download | synapse-22ea51faf9a29cd9b96189d1fac95eaf2cfcf4ec.tar.xz |
Add support for compression to federation responses (#13537)
Closes #13415. Signed-off-by: Ayush Anand <iamayushanand@gmail.com>
Diffstat (limited to '')
-rw-r--r-- | synapse/app/homeserver.py | 5 |
1 files changed, 4 insertions, 1 deletions
diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index 745e704141..d98012adeb 100644 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -220,7 +220,10 @@ class SynapseHomeServer(HomeServer): resources.update({"/_matrix/consent": consent_resource}) if name == "federation": - resources.update({FEDERATION_PREFIX: TransportLayerServer(self)}) + federation_resource: Resource = TransportLayerServer(self) + if compress: + federation_resource = gz_wrap(federation_resource) + resources.update({FEDERATION_PREFIX: federation_resource}) if name == "openid": resources.update( |