Skip to content
This repository has been archived by the owner on Apr 26, 2024. It is now read-only.

Commit

Permalink
Add support for compression to federation responses
Browse files Browse the repository at this point in the history
Signed-off-by: Ayush Anand <iamayushanand@gmail.com>
  • Loading branch information
iamayushanand committed Aug 16, 2022
1 parent d642ce4 commit feff038
Showing 1 changed file with 4 additions and 1 deletion.
5 changes: 4 additions & 1 deletion synapse/app/homeserver.py
Original file line number Diff line number Diff line change
Expand Up @@ -220,7 +220,10 @@ def _configure_named_resource(
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(
Expand Down

0 comments on commit feff038

Please sign in to comment.