Use the correct hostname when calling federated servers

Fixes #175
This commit is contained in:
Travis Ralston 2018-05-06 12:21:40 -06:00
parent 39365fd00e
commit 8f98716217

View File

@ -60,6 +60,9 @@ export async function doFederatedApiCall(method: string, serverName: string, end
qs: query, qs: query,
json: body, json: body,
rejectUnauthorized: false, // allow self signed certs (for federation) rejectUnauthorized: false, // allow self signed certs (for federation)
headers: {
"Host": serverName,
},
}, (err, res, _body) => { }, (err, res, _body) => {
if (err) { if (err) {
LogService.error("matrix", "Error calling " + endpoint); LogService.error("matrix", "Error calling " + endpoint);