diff --git a/crawler.js b/crawler.js index 8c221fb..24f32d2 100644 --- a/crawler.js +++ b/crawler.js @@ -95,13 +95,12 @@ class BlockCrawler extends EventEmitter { absoluteTargetUrl = urlMod.resolve(context.url, targetHref); urlObj = urlMod.parse(absoluteTargetUrl); if(forceHttps){ - protocol = 'https' + protocol = 'https:' }else{ protocol = urlObj.protocol; } hostname = urlObj.hostname; - if (protocol !== "http:" && protocol !== "https:") { return null; } @@ -111,7 +110,7 @@ class BlockCrawler extends EventEmitter { } return urlMod.format({ - protocol: urlObj.protocol, + protocol: protocol, auth: urlObj.auth, host: urlObj.host, pathname: urlObj.pathname,