This repository was archived by the owner on Apr 26, 2024. It is now read-only.
File tree Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Expand file tree Collapse file tree 3 files changed +6
-2
lines changed Original file line number Diff line number Diff line change
1
+ Add support for compression to federation responses.
Original file line number Diff line number Diff line change @@ -444,7 +444,7 @@ Sub-options for each listener include:
444
444
* `names`: a list of names of HTTP resources. See below for a list of valid resource names.
445
445
446
446
* `compress`: set to true to enable gzip compression on HTTP bodies for this resource. This is currently only supported with the
447
- ` client` , `consent` and `metrics ` resources.
447
+ ` client` , `consent`, `metrics` and `federation ` resources.
448
448
449
449
* `additional_resources`: Only valid for an 'http' listener. A map of
450
450
additional endpoints which should be loaded via dynamic modules.
Original file line number Diff line number Diff line change @@ -220,7 +220,10 @@ def _configure_named_resource(
220
220
resources .update ({"/_matrix/consent" : consent_resource })
221
221
222
222
if name == "federation" :
223
- resources .update ({FEDERATION_PREFIX : TransportLayerServer (self )})
223
+ federation_resource : Resource = TransportLayerServer (self )
224
+ if compress :
225
+ federation_resource = gz_wrap (federation_resource )
226
+ resources .update ({FEDERATION_PREFIX : federation_resource })
224
227
225
228
if name == "openid" :
226
229
resources .update (
You can’t perform that action at this time.
0 commit comments