mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-09-07 18:11:56 +00:00
32 lines
1.4 KiB
Diff
32 lines
1.4 KiB
Diff
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:
|