From 86cef6a91b330d99b86cf2eacf75a446ce2e2955 Mon Sep 17 00:00:00 2001 From: Erik Johnston Date: Tue, 25 Aug 2015 12:01:23 +0100 Subject: Allow specifying a directory to host a web client from --- synapse/app/homeserver.py | 8 +++++--- synapse/config/server.py | 1 + 2 files changed, 6 insertions(+), 3 deletions(-) diff --git a/synapse/app/homeserver.py b/synapse/app/homeserver.py index f04493f92a..2c59457cda 100755 --- a/synapse/app/homeserver.py +++ b/synapse/app/homeserver.py @@ -97,9 +97,11 @@ class SynapseHomeServer(HomeServer): return JsonResource(self) def build_resource_for_web_client(self): - import syweb - syweb_path = os.path.dirname(syweb.__file__) - webclient_path = os.path.join(syweb_path, "webclient") + webclient_path = self.get_config().web_client_location + if not webclient_path: + import syweb + syweb_path = os.path.dirname(syweb.__file__) + webclient_path = os.path.join(syweb_path, "webclient") # GZip is disabled here due to # https://twistedmatrix.com/trac/ticket/7678 # (It can stay enabled for the API resources: they call diff --git a/synapse/config/server.py b/synapse/config/server.py index f9a3b5f15b..a03e55c223 100644 --- a/synapse/config/server.py +++ b/synapse/config/server.py @@ -22,6 +22,7 @@ class ServerConfig(Config): self.server_name = config["server_name"] self.pid_file = self.abspath(config.get("pid_file")) self.web_client = config["web_client"] + self.web_client_location = config.get("web_client_location", None) self.soft_file_limit = config["soft_file_limit"] self.daemonize = config.get("daemonize") self.print_pidfile = config.get("print_pidfile") -- cgit 1.4.1