[FIX] Server URL regex (#1175)
This commit is contained in:
parent
2b1dc27181
commit
ebb60489f0
|
@ -181,7 +181,7 @@ class NewServerView extends React.Component {
|
||||||
url = `${ url }.rocket.chat`;
|
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)) {
|
if (/^localhost(:\d+)?/.test(url)) {
|
||||||
url = `http://${ url }`;
|
url = `http://${ url }`;
|
||||||
} else if (/^https?:\/\//.test(url) === false) {
|
} else if (/^https?:\/\//.test(url) === false) {
|
||||||
|
|
Loading…
Reference in New Issue