From a65bf351bc4269eeffcb509b6f1a1ed1f82524d6 Mon Sep 17 00:00:00 2001 From: Matt Prestlien Date: Wed, 20 Jan 2016 08:54:05 -0800 Subject: [PATCH] Allow intranet URLs This could be a great way to package intranet applications into electron apps. Added `require_tld` validator config setting to allow those intranet locations without a TLD to be packaged. --- src/options.js | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/src/options.js b/src/options.js index 40f7778..1819878 100644 --- a/src/options.js +++ b/src/options.js @@ -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: true})) { throw `Your Url: "${normalized}" is invalid!`; } return normalized;