|
|
@ -111,6 +111,9 @@ class Af_Zz_ImgProxy extends Plugin {
|
|
|
|
}
|
|
|
|
}
|
|
|
|
|
|
|
|
|
|
|
|
private function rewrite_url_if_needed($url, $all_remote = false) {
|
|
|
|
private function rewrite_url_if_needed($url, $all_remote = false) {
|
|
|
|
|
|
|
|
/* we don't need to handle URLs where local cache already exists, tt-rss rewrites those automatically */
|
|
|
|
|
|
|
|
if (!$this->cache->exists(sha1($url))) {
|
|
|
|
|
|
|
|
|
|
|
|
$scheme = parse_url($url, PHP_URL_SCHEME);
|
|
|
|
$scheme = parse_url($url, PHP_URL_SCHEME);
|
|
|
|
|
|
|
|
|
|
|
|
if ($all_remote) {
|
|
|
|
if ($all_remote) {
|
|
|
@ -124,8 +127,6 @@ 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) {
|
|
|
|