[FIX] x-instance-id header prop is case insensitive (#551)
This commit is contained in:
parent
e66dbd8ca3
commit
4bc54f10e0
|
@ -84,7 +84,7 @@ const RocketChat = {
|
||||||
}
|
}
|
||||||
},
|
},
|
||||||
_hasInstanceId(headers) {
|
_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) {
|
async testServer(url) {
|
||||||
try {
|
try {
|
||||||
|
|
Loading…
Reference in New Issue