summary refs log tree commit diff
diff options
context:
space:
mode:
authorMark Haines <mark.haines@matrix.org>2014-12-02 17:20:02 +0000
committerMark Haines <mark.haines@matrix.org>2014-12-02 17:20:02 +0000
commit7993e3d10dd5b33f6443b974b36b988130f1b156 (patch)
tree8d0085bfaf12b419d2e6be19c306040fc955b725
parentMerge pull request #21 from tjardick/master (diff)
downloadsynapse-7993e3d10dd5b33f6443b974b36b988130f1b156.tar.xz
SYN-187: Set a more sensible default for the content_addr v0.5.3b
Diffstat (limited to '')
-rw-r--r--synapse/config/server.py7
1 files changed, 5 insertions, 2 deletions
diff --git a/synapse/config/server.py b/synapse/config/server.py
index 814a4c349b..f8a0844b8c 100644
--- a/synapse/config/server.py
+++ b/synapse/config/server.py
@@ -35,8 +35,11 @@ class ServerConfig(Config):
         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,)
+                host = "%s:%d" % (host, args.unsecure_port)
+            else:
+                host = host.split(':')[0]
+                host = "%s:%d" % (host, args.unsecure_port)
+            args.content_addr = "http://%s" % (host,)
 
         self.content_addr = args.content_addr