Add support for compression to federation responses (#13537)

Closes #13415.

Signed-off-by: Ayush Anand <iamayushanand@gmail.com>
This commit is contained in:
Ayush Anand 2022-08-18 19:44:47 +05:30 committed by GitHub
parent 84169a82dc
commit 22ea51faf9
No known key found for this signature in database
GPG key ID: 4AEE18F83AFDEB23
3 changed files with 6 additions and 2 deletions

View file

@ -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(