diff options
author | Erik Johnston <erik@matrix.org> | 2015-06-03 17:18:17 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2015-06-03 17:18:17 +0100 |
commit | d4902a7ad08140bfb48c10a67f56d22fee68d0ec (patch) | |
tree | 8c1da253a98d3f7f3aad1fafb83bdec9a5d493d5 /synapse/app | |
parent | Log where a request came from in federation (diff) | |
parent | Add config option to disable compression of http responses (diff) | |
download | synapse-d4902a7ad08140bfb48c10a67f56d22fee68d0ec.tar.xz |
Merge pull request #174 from matrix-org/erikj/compress_option
Add config option to disable compression of http responses
Diffstat (limited to 'synapse/app')
-rwxr-xr-x | synapse/app/homeserver.py | 10 |
1 files changed, 8 insertions, 2 deletions
diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index d93afdc1c2..65a5dfa84e 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -87,10 +87,16 @@ class SynapseHomeServer(HomeServer): return MatrixFederationHttpClient(self) def build_resource_for_client(self): - return gz_wrap(ClientV1RestResource(self)) + res = ClientV1RestResource(self) + if self.config.gzip_responses: + res = gz_wrap(res) + return res def build_resource_for_client_v2_alpha(self): - return gz_wrap(ClientV2AlphaRestResource(self)) + res = ClientV2AlphaRestResource(self) + if self.config.gzip_responses: + res = gz_wrap(res) + return res def build_resource_for_federation(self): return JsonResource(self) |