2
2
mirror of https://github.com/Llewellynvdm/nativefier.git synced 2025-01-26 16:48:32 +00:00

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

View File

@ -115,7 +115,7 @@ function normalizeUrl(testUrl) {
if (!parsed.protocol) { if (!parsed.protocol) {
normalized = 'http://' + normalized; 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!`; throw `Your Url: "${normalized}" is invalid!`;
} }
return normalized; return normalized;