diff options
author | Richard van der Hoff <github@rvanderhoff.org.uk> | 2017-10-27 11:01:50 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2017-10-27 11:01:50 +0100 |
commit | 8b56977b6f4f34b5ad77f04a2544c153af9136c7 (patch) | |
tree | 2d2084622339e2228117f22beedf6058ad223056 /synapse/app | |
parent | Merge pull request #2585 from matrix-org/rav/unstable_to_r0 (diff) | |
parent | Docstring for post_urlencoded_get_json (diff) | |
download | synapse-8b56977b6f4f34b5ad77f04a2544c153af9136c7.tar.xz |
Merge pull request #2586 from matrix-org/rav/frontend_proxy_auth_header
Front-end proxy: pass through auth header
Diffstat (limited to 'synapse/app')
-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 3f8c3feeb5..abc7ef5725 100644 --- a/synapse/app/frontend_proxy.py +++ b/synapse/app/frontend_proxy.py @@ -88,9 +88,16 @@ class KeyUploadServlet(RestServlet): if body: # They're actually trying to upload something, proxy to main synapse. + # 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.post_json_get_json( self.main_uri + request.uri, body, + headers=headers, ) defer.returnValue((200, result)) |