summary refs log tree commit diff
diff options
context:
space:
mode:
authorMichael Kaye <1917473+michaelkaye@users.noreply.github.com>2018-11-02 12:00:18 +0000
committerGitHub <noreply@github.com>2018-11-02 12:00:18 +0000
commit41585e1340ab69b57e72c311413bb086ae8aa66c (patch)
tree682dd596863a03ec42e4eae9d2a0482d67e822dd
parentfix conflict and reinstate 6372dff771413c2b9cd5648cbb6de01a679ef801 (diff)
parentAllow us to configure http vs https for user_directory (diff)
downloadsynapse-41585e1340ab69b57e72c311413bb086ae8aa66c.tar.xz
Merge pull request #4047 from matrix-org/michaelkaye/dinsic_allow_user_directory_url
user_directory.defer_to_id_server should be an URL, not a hostname
-rw-r--r--synapse/config/user_directory.py2
-rw-r--r--synapse/rest/client/v2_alpha/user_directory.py2
2 files changed, 2 insertions, 2 deletions
diff --git a/synapse/config/user_directory.py b/synapse/config/user_directory.py
index 9b0ae91289..eba99976ac 100644
--- a/synapse/config/user_directory.py
+++ b/synapse/config/user_directory.py
@@ -49,5 +49,5 @@ class UserDirectoryConfig(Config):
         #   If this is set, user search will be delegated to this ID server instead
         #   of synapse performing the search itself.
         #   This is an experimental API.
-        #   defer_to_id_server: id.example.com
+        #   defer_to_id_server: https://id.example.com
         """
diff --git a/synapse/rest/client/v2_alpha/user_directory.py b/synapse/rest/client/v2_alpha/user_directory.py
index 5db8b5efb3..8799dc3efe 100644
--- a/synapse/rest/client/v2_alpha/user_directory.py
+++ b/synapse/rest/client/v2_alpha/user_directory.py
@@ -66,7 +66,7 @@ class UserDirectorySearchRestServlet(RestServlet):
 
         if self.hs.config.user_directory_defer_to_id_server:
             signed_body = sign_json(body, self.hs.hostname, self.hs.config.signing_key[0])
-            url = "http://%s/_matrix/identity/api/v1/user_directory/search" % (
+            url = "%s/_matrix/identity/api/v1/user_directory/search" % (
                 self.hs.config.user_directory_defer_to_id_server,
             )
             resp = yield self.http_client.post_json_get_json(url, signed_body)