mirror of
https://github.com/zhigang1992/favicongrabber.com.git
synced 2026-05-07 05:00:00 +08:00
Fix: check /favicon.ico size
This commit is contained in:
@@ -11,6 +11,8 @@ module.exports = ($, done) => {
|
||||
// ignore errors
|
||||
if (err) return done(null, []);
|
||||
if (res.statusCode !== 200) return done(null, []);
|
||||
// check image size
|
||||
if (!(parseInt(res.headers['content-length'], 10) > 0)) return done(null, []);
|
||||
|
||||
return done(null, [{
|
||||
src: url,
|
||||
|
||||
@@ -1,9 +1,4 @@
|
||||
{
|
||||
"domain": "s7.com",
|
||||
"icons": [
|
||||
{
|
||||
"src": "http://s7.com/favicon.ico",
|
||||
"type": "image/x-icon"
|
||||
}
|
||||
]
|
||||
"icons": []
|
||||
}
|
||||
|
||||
4
test/api/data/timeclockwizard.com.json
Normal file
4
test/api/data/timeclockwizard.com.json
Normal file
@@ -0,0 +1,4 @@
|
||||
{
|
||||
"domain": "timeclockwizard.com",
|
||||
"icons": []
|
||||
}
|
||||
Reference in New Issue
Block a user