mirror of
https://git.tt-rss.org/git/tt-rss.git
synced 2025-12-13 22:45:56 +00:00
af_zz_imgproxy: limit enclosure rewriting to images
This commit is contained in:
@@ -24,9 +24,11 @@ class Af_Zz_ImgProxy extends Plugin {
|
|||||||
}
|
}
|
||||||
|
|
||||||
function hook_enclosure_entry($enc) {
|
function hook_enclosure_entry($enc) {
|
||||||
|
if (preg_match("/image/", $enc["type"]) || preg_match("/\.(jpg|png|gif|bmp)/i", $enc["filename"])) {
|
||||||
$proxy_all = $this->host->get($this, "proxy_all");
|
$proxy_all = $this->host->get($this, "proxy_all");
|
||||||
|
|
||||||
$enc["content_url"] = $this->rewrite_url_if_needed($enc["content_url"], $proxy_all);
|
$enc["content_url"] = $this->rewrite_url_if_needed($enc["content_url"], $proxy_all);
|
||||||
|
}
|
||||||
|
|
||||||
return $enc;
|
return $enc;
|
||||||
}
|
}
|
||||||
|
|||||||
Reference in New Issue
Block a user