diff options
author | Richard van der Hoff <github@rvanderhoff.org.uk> | 2017-10-27 12:57:11 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-27 12:57:11 +0100 |
commit | cd0a800c5a60f75bb75001430cbf1126acc42588 (patch) | |
tree | 9641c416dcf6ce9ce5100c1c95551585572f0da1 | |
parent | PEP8 (diff) | |
parent | Merge branch 'matrix-org-hotfixes' into rav/frontend_proxy_auth_header_matrix... (diff) | |
download | synapse-cd0a800c5a60f75bb75001430cbf1126acc42588.tar.xz |
Merge pull request #2587 from matrix-org/rav/frontend_proxy_auth_header_matrix_hotfixes
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 e40864e5bd..0e770900ff 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)) |