Skip to content
Snippets Groups Projects
Commit 54a25251 authored by Richard van der Hoff's avatar Richard van der Hoff
Browse files

Front-end proxy: pass through auth header

So that access-token-in-an-auth-header works.
parent 12ef02dc
No related branches found
No related tags found
No related merge requests found
......@@ -89,9 +89,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))
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment