diff options
author | Erik Johnston <erik@matrix.org> | 2014-09-03 11:57:23 +0100 |
---|---|---|
committer | Erik Johnston <erik@matrix.org> | 2014-09-03 11:57:23 +0100 |
commit | bc21350298ff87b5f4cebfbba669435eb4ff4e75 (patch) | |
tree | 65c4f5e0637230649c669a3ce1279e1cc3188847 /synapse/config | |
parent | Update port numbers. (diff) | |
download | synapse-bc21350298ff87b5f4cebfbba669435eb4ff4e75.tar.xz |
Add option to change content repo location
Diffstat (limited to 'synapse/config')
-rw-r--r-- | synapse/config/server.py | 12 |
1 files changed, 12 insertions, 0 deletions
diff --git a/synapse/config/server.py b/synapse/config/server.py index 36143e3c9c..cb178435ea 100644 --- a/synapse/config/server.py +++ b/synapse/config/server.py @@ -32,6 +32,14 @@ class ServerConfig(Config): self.webclient = True self.manhole = args.manhole + if not args.content_addr: + host = args.server_name + if ':' not in host: + host = "%s:%d" % (host, args.bind_port) + args.content_addr = "https://%s" % (host,) + + self.content_addr = args.content_addr + @classmethod def add_arguments(cls, parser): super(ServerConfig, cls).add_arguments(parser) @@ -57,6 +65,9 @@ class ServerConfig(Config): type=int, help="Turn on the twisted telnet manhole" " service on the given port.") + server_group.add_argument("--content-addr", default=None, + help="The host and scheme to use for the " + "content repository") def read_signing_key(self, signing_key_path): signing_key_base64 = self.read_file(signing_key_path, "signing_key") @@ -77,3 +88,4 @@ class ServerConfig(Config): with open(args.signing_key_path, "w") as signing_key_file: key = nacl.signing.SigningKey.generate() signing_key_file.write(encode_base64(key.encode())) + |