summary refs log tree commit diff
path: root/synapse/config/server.py
diff options
context:
space:
mode:
authorDavid Baker <dave@matrix.org>2016-04-27 15:09:55 +0100
committerDavid Baker <dave@matrix.org>2016-04-27 15:09:55 +0100
commitfa12209c1b297a1710f487744a8a143d6cb6a2d1 (patch)
treefbaa9f9219946cb349351e5afca62b97e4105d7d /synapse/config/server.py
parentMore variable calculation for email notifs (diff)
downloadsynapse-fa12209c1b297a1710f487744a8a143d6cb6a2d1.tar.xz
Hopefully all remaining bits for email notifs
Add public facing base url to the server so synapse knows what URL to use when converting mxc to http urls for use in emails
Diffstat (limited to 'synapse/config/server.py')
-rw-r--r--synapse/config/server.py8
1 files changed, 8 insertions, 0 deletions
diff --git a/synapse/config/server.py b/synapse/config/server.py
index df4707e1d1..19af39da70 100644
--- a/synapse/config/server.py
+++ b/synapse/config/server.py
@@ -28,6 +28,11 @@ class ServerConfig(Config):
         self.print_pidfile = config.get("print_pidfile")
         self.user_agent_suffix = config.get("user_agent_suffix")
         self.use_frozen_dicts = config.get("use_frozen_dicts", True)
+        self.public_baseurl = config.get("public_baseurl")
+
+        if self.public_baseurl is not None:
+            if self.public_baseurl[-1] != '/':
+                self.public_baseurl += '/'
 
         self.listeners = config.get("listeners", [])
 
@@ -142,6 +147,9 @@ class ServerConfig(Config):
         # Whether to serve a web client from the HTTP/HTTPS root resource.
         web_client: True
 
+        # The server's public-facing base URL
+        # https://example.com:8448/
+
         # Set the soft limit on the number of file descriptors synapse can use
         # Zero is used to indicate synapse should set the soft limit to the
         # hard limit.