[FIX] x-instance-id header prop is case insensitive (#551)

This commit is contained in:
Diego Mello 2018-11-27 18:25:00 -02:00 committed by GitHub
parent e66dbd8ca3
commit 4bc54f10e0
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23
1 changed files with 1 additions and 1 deletions

View File

@ -84,7 +84,7 @@ const RocketChat = {
}
},
_hasInstanceId(headers) {
return (headers['x-instance-id'] != null && headers['x-instance-id'].length > 0) || (headers['X-Instance-ID'] != null && headers['X-Instance-ID'].length > 0);
return !!Object.keys(headers).findIndex(item => item.toLowerCase() === 'x-instance-id');
},
async testServer(url) {
try {