Fix URL regex in server side

This commit is contained in:
Jesús Ángel González 2018-07-10 09:27:32 +02:00 committed by Jesús Ángel
parent e9b23c80ad
commit 11ae30ddaa

View File

@ -15,7 +15,7 @@ import ErrorResponse from './error-response';
const userRegEx = new RegExp(/^.{3,100}$/);
const passRegEx = new RegExp(/^.{3,100}$/);
const urlRegEx = new RegExp(/^https?:\/\/[a-zA-Z0-9]{1,300}$/);
const urlRegEx = new RegExp(/^https?:\/\/[a-zA-Z0-9-.]{1,300}$/);
const urlRegExIP = new RegExp(/^https?:\/\/[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}\.[0-9]{1,3}$/);
const portRegEx = new RegExp(/^[0-9]{2,5}$/);