mirror of
https://github.com/thelounge/thelounge
synced 2024-11-22 20:13:07 +00:00
Merge pull request #1274 from thelounge/xpaw/increase-prefetch-limit
Increase max downloaded bytes for link preview
This commit is contained in:
commit
ad10777684
1 changed files with 3 additions and 2 deletions
|
@ -139,8 +139,9 @@ function fetch(url, cb) {
|
|||
req
|
||||
.on("response", function(res) {
|
||||
if (!(/^image\/.+/.test(res.headers["content-type"]))) {
|
||||
// if not image, limit download to 10kb, since we need only meta tags
|
||||
limit = 1024 * 10;
|
||||
// if not image, limit download to 50kb, since we need only meta tags
|
||||
// twitter.com sends opengraph meta tags within ~20kb of data for individual tweets
|
||||
limit = 1024 * 50;
|
||||
}
|
||||
})
|
||||
.on("error", function() {})
|
||||
|
|
Loading…
Reference in a new issue