From bef34f7f96b48454999f18752289ace76e056794 Mon Sep 17 00:00:00 2001 From: diegolmello Date: Wed, 28 Nov 2018 10:10:22 -0200 Subject: [PATCH] [FIX] x-instance-id header prop is case insensitive --- app/lib/rocketchat.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/app/lib/rocketchat.js b/app/lib/rocketchat.js index 102444214..df48e2753 100644 --- a/app/lib/rocketchat.js +++ b/app/lib/rocketchat.js @@ -84,7 +84,7 @@ const RocketChat = { } }, _hasInstanceId(headers) { - return !!Object.keys(headers).findIndex(item => item.toLowerCase() === 'x-instance-id'); + return !!headers[Object.keys(headers).find(item => item.toLowerCase() === 'x-instance-id')]; }, async testServer(url) { try {