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/http/server.py | |
parent | Update port numbers. (diff) | |
download | synapse-bc21350298ff87b5f4cebfbba669435eb4ff4e75.tar.xz |
Add option to change content repo location
Diffstat (limited to '')
-rw-r--r-- | synapse/http/server.py | 7 |
1 files changed, 4 insertions, 3 deletions
diff --git a/synapse/http/server.py b/synapse/http/server.py index 74c220e869..8b887006bb 100644 --- a/synapse/http/server.py +++ b/synapse/http/server.py @@ -215,11 +215,12 @@ class ContentRepoResource(resource.Resource): """ isLeaf = True - def __init__(self, hs, directory, auth): + def __init__(self, hs, directory, auth, external_addr): resource.Resource.__init__(self) self.hs = hs self.directory = directory self.auth = auth + self.external_addr = external_addr.rstrip('/') if not os.path.isdir(self.directory): os.mkdir(self.directory) @@ -332,8 +333,8 @@ class ContentRepoResource(resource.Resource): # ...plus self-signed SSL won't work to remote clients anyway # ...and we can't assume that it's SSL anyway, as we might want to # server it via the non-SSL listener... - url = "https://%s/_matrix/content/%s" % ( - self.hs.domain_with_port, file_name + url = "%s/_matrix/content/%s" % ( + self.external_addr, file_name ) respond_with_json_bytes(request, 200, |