mirror of
https://git.anonymousland.org/anonymousland/synapse-product.git
synced 2024-10-01 08:25:44 -04:00
Front-end proxy: pass through auth header
So that access-token-in-an-auth-header works.
This commit is contained in:
parent
12ef02dc3d
commit
54a2525133
@ -89,9 +89,16 @@ class KeyUploadServlet(RestServlet):
|
|||||||
|
|
||||||
if body:
|
if body:
|
||||||
# They're actually trying to upload something, proxy to main synapse.
|
# 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(
|
result = yield self.http_client.post_json_get_json(
|
||||||
self.main_uri + request.uri,
|
self.main_uri + request.uri,
|
||||||
body,
|
body,
|
||||||
|
headers=headers,
|
||||||
)
|
)
|
||||||
|
|
||||||
defer.returnValue((200, result))
|
defer.returnValue((200, result))
|
||||||
|
Loading…
Reference in New Issue
Block a user