mirror of
https://github.com/element-hq/synapse.git
synced 2024-12-14 11:57:44 +00:00
Add support for compression to federation responses (#13537)
Closes #13415. Signed-off-by: Ayush Anand <iamayushanand@gmail.com>
This commit is contained in:
parent
84169a82dc
commit
22ea51faf9
3 changed files with 6 additions and 2 deletions
1
changelog.d/13537.bugfix
Normal file
1
changelog.d/13537.bugfix
Normal file
|
@ -0,0 +1 @@
|
|||
Add support for compression to federation responses.
|
|
@ -444,7 +444,7 @@ Sub-options for each listener include:
|
|||
* `names`: a list of names of HTTP resources. See below for a list of valid resource names.
|
||||
|
||||
* `compress`: set to true to enable gzip compression on HTTP bodies for this resource. This is currently only supported with the
|
||||
`client`, `consent` and `metrics` resources.
|
||||
`client`, `consent`, `metrics` and `federation` resources.
|
||||
|
||||
* `additional_resources`: Only valid for an 'http' listener. A map of
|
||||
additional endpoints which should be loaded via dynamic modules.
|
||||
|
|
|
@ -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(
|
||||
|
|
Loading…
Reference in a new issue