From 8f9871621703f27798ae1297e324d5dcb213bdd3 Mon Sep 17 00:00:00 2001 From: Travis Ralston Date: Sun, 6 May 2018 12:21:40 -0600 Subject: [PATCH] Use the correct hostname when calling federated servers Fixes #175 --- src/matrix/helpers.ts | 3 +++ 1 file changed, 3 insertions(+) diff --git a/src/matrix/helpers.ts b/src/matrix/helpers.ts index bcb10f2..3ecc656 100644 --- a/src/matrix/helpers.ts +++ b/src/matrix/helpers.ts @@ -60,6 +60,9 @@ export async function doFederatedApiCall(method: string, serverName: string, end qs: query, json: body, rejectUnauthorized: false, // allow self signed certs (for federation) + headers: { + "Host": serverName, + }, }, (err, res, _body) => { if (err) { LogService.error("matrix", "Error calling " + endpoint);