diff options
author | Richard van der Hoff <richard@matrix.org> | 2017-10-26 22:13:26 +0100 |
---|---|---|
committer | Richard van der Hoff <richard@matrix.org> | 2017-10-26 22:13:26 +0100 |
commit | 2ba1922bfe8f819d6e52415e6d3d1b005976c332 (patch) | |
tree | e5e9e170191c35a536e1a387ecfed039e23b0c84 | |
parent | Merge branch 'develop' of github.com:matrix-org/synapse into matrix-org-hotfixes (diff) | |
download | synapse-2ba1922bfe8f819d6e52415e6d3d1b005976c332.tar.xz |
Front-end proxy: fix auth header for presence too
-rw-r--r-- | synapse/app/frontend_proxy.py | 7 |
1 files changed, 7 insertions, 0 deletions
diff --git a/synapse/app/frontend_proxy.py b/synapse/app/frontend_proxy.py index 77bda727c8..d710480035 100644 --- a/synapse/app/frontend_proxy.py +++ b/synapse/app/frontend_proxy.py @@ -61,8 +61,15 @@ class PresenceStatusStubServlet(ClientV1RestServlet): @defer.inlineCallbacks def on_GET(self, request, user_id): + # Pass through the auth headers, if any, in case the access token + # is there. + auth_headers = request.requestHeaders.getRawHeaders("Authorization", []) + headers = { + "Authorization": auth_headers, + } result = yield self.http_client.get_json( self.main_uri + request.uri, + headers=headers, ) defer.returnValue((200, result)) |