Skip to content

Commit

Permalink
Fixed: force_https option not working
Browse files Browse the repository at this point in the history
  • Loading branch information
nunnun committed Mar 18, 2018
1 parent 8a46147 commit 479f24d
Showing 1 changed file with 2 additions and 3 deletions.
5 changes: 2 additions & 3 deletions crawler.js
Original file line number Diff line number Diff line change
Expand Up @@ -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;
}
Expand All @@ -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,
Expand Down

0 comments on commit 479f24d

Please sign in to comment.