1
2
3
4
5
6
7
8
9
10
11
12
13
14
15
16
17
18
19
20
21
22
23
24
25
26
27
28
29
30
31
|
Index: package-synapse-debian/synapse/app/homeserver.py
===================================================================
--- package-synapse-debian.orig/synapse/app/homeserver.py
+++ package-synapse-debian/synapse/app/homeserver.py
@@ -124,7 +124,7 @@ class SynapseHomeServer(HomeServer):
for res in listener_config["resources"]:
for name in res["names"]:
resources.update(self._configure_named_resource(
- name, res.get("compress", False),
+ config, name, res.get("compress", False),
))
additional_resources = listener_config.get("additional_resources", {})
@@ -171,7 +171,7 @@ class SynapseHomeServer(HomeServer):
)
logger.info("Synapse now listening on port %d", port)
- def _configure_named_resource(self, name, compress=False):
+ def _configure_named_resource(self, config, name, compress=False):
"""Build a resource map for a named resource
Args:
@@ -235,7 +235,7 @@ class SynapseHomeServer(HomeServer):
if name in ["keys", "federation"]:
resources[SERVER_KEY_V2_PREFIX] = KeyApiV2Resource(self)
- if name == "webclient":
+ if name == "webclient" and config.web_client:
resources[WEB_CLIENT_PREFIX] = build_resource_for_web_client(self)
if name == "metrics" and self.get_config().enable_metrics:
|