diff --git a/app/lib/rocketchat.js b/app/lib/rocketchat.js index 1cb08a98a..97faaac0b 100644 --- a/app/lib/rocketchat.js +++ b/app/lib/rocketchat.js @@ -42,7 +42,7 @@ const RocketChat = { } }, async testServer(url) { - if (/^(https?:\/\/)?(((\w|[0-9])+(\.(\w|[0-9-_])+)+)|localhost)(:\d+)?$/.test(url)) { + if (/^(https?:\/\/)?(((\w|[0-9-_])+(\.(\w|[0-9-_])+)+)|localhost)(:\d+)?$/.test(url)) { const response = await fetch(url, { method: 'HEAD' }); if (response.status === 200 && response.headers.get('x-instance-id') != null && response.headers.get('x-instance-id').length) { return url;