Add support for compression to federation responses (#13537)
Closes #13415. Signed-off-by: Ayush Anand <iamayushanand@gmail.com>pull/13557/head
							parent
							
								
									84169a82dc
								
							
						
					
					
						commit
						22ea51faf9
					
				|  | @ -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 New Issue
	
	 Ayush Anand
						Ayush Anand