Merge pull request #20 from mattchue/master

Allow intranet URLs
This commit is contained in:
Jia Hao 2016-01-21 08:33:08 +07:00
commit 16dab25321
1 changed files with 1 additions and 1 deletions

View File

@ -115,7 +115,7 @@ function normalizeUrl(testUrl) {
if (!parsed.protocol) {
normalized = 'http://' + normalized;
}
if (!validator.isURL(normalized, {require_protocol: true})) {
if (!validator.isURL(normalized, {require_protocol: true, require_tld: false})) {
throw `Your Url: "${normalized}" is invalid!`;
}
return normalized;