From 4bb164dafea78336d2bf6960c68e40d653b31e3f Mon Sep 17 00:00:00 2001 From: luchenqun Date: Thu, 9 Mar 2017 13:07:01 +0800 Subject: [PATCH] =?UTF-8?q?=E7=94=A8http=E6=9B=BF=E6=8D=A2=E4=B8=80?= =?UTF-8?q?=E4=B8=8Bhttps=E8=8E=B7=E5=8F=96favicon?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- routes/api.js | 6 ++++++ 1 file changed, 6 insertions(+) diff --git a/routes/api.js b/routes/api.js index 0a03b7f..9fbe6ea 100644 --- a/routes/api.js +++ b/routes/api.js @@ -959,6 +959,12 @@ api.getFaviconByTimer = function() { busy = false }); } else { + // 尝试用http试一下:手动抓取成功后会被缓存起来,直接使用[http]即可访问.请勿批量使用[https] + if (faviconState == 1) { + if (url.startsWith("https")) { + url = "http" + url.substring(5); + } + } var faviconUrl = "http://g.soz.im/" + url; download(faviconUrl).then(data => { fs.writeFileSync(faviconPath, data);