af_zz_imgproxy: redirect to cached_url if cache already exists so that urls are a bit shorter (2)
This commit is contained in:
parent
e7edaca4db
commit
c6ae5fbda1
|
@ -124,6 +124,8 @@ class Af_Zz_ImgProxy extends Plugin {
|
||||||
|
|
||||||
if (($scheme != 'https' && $scheme != "") || $is_remote) {
|
if (($scheme != 'https' && $scheme != "") || $is_remote) {
|
||||||
if (strpos($url, "data:") !== 0) {
|
if (strpos($url, "data:") !== 0) {
|
||||||
|
/* we don't need to handle URLs where local cache already exists, tt-rss rewrites those automatically */
|
||||||
|
if (!$this->cache->exists(sha1($url))) {
|
||||||
$parts = parse_url($url);
|
$parts = parse_url($url);
|
||||||
|
|
||||||
foreach (explode(" " , $this->ssl_known_whitelist) as $host) {
|
foreach (explode(" " , $this->ssl_known_whitelist) as $host) {
|
||||||
|
@ -138,8 +140,6 @@ class Af_Zz_ImgProxy extends Plugin {
|
||||||
}
|
}
|
||||||
}
|
}
|
||||||
|
|
||||||
/* we don't need to handle URLs where local cache already exists, tt-rss rewrites those automatically */
|
|
||||||
if (!$this->cache->exists(sha1($url))) {
|
|
||||||
return get_self_url_prefix() . "/public.php?op=pluginhandler&plugin=af_zz_imgproxy&pmethod=imgproxy&url=" .
|
return get_self_url_prefix() . "/public.php?op=pluginhandler&plugin=af_zz_imgproxy&pmethod=imgproxy&url=" .
|
||||||
urlencode($url);
|
urlencode($url);
|
||||||
}
|
}
|
||||||
|
|
Loading…
Reference in New Issue