[FIX] Server URL regex (#1175)

This commit is contained in:
Filipe Brito 2019-09-16 18:04:20 -03:00 committed by Diego Mello
parent 2b1dc27181
commit ebb60489f0
1 changed files with 1 additions and 1 deletions

View File

@ -181,7 +181,7 @@ class NewServerView extends React.Component {
url = `${ url }.rocket.chat`;
}
if (/^(https?:\/\/)?(((\w|[0-9])+(\.(\w|[0-9-_])+)+)|localhost)(:\d+)?$/.test(url)) {
if (/^(https?:\/\/)?(((\w|[0-9-_])+(\.(\w|[0-9-_])+)+)|localhost)(:\d+)?$/.test(url)) {
if (/^localhost(:\d+)?/.test(url)) {
url = `http://${ url }`;
} else if (/^https?:\/\//.test(url) === false) {