1
0
mirror of https://git.tt-rss.org/git/tt-rss.git synced 2026-02-08 10:51:33 +00:00

Merge branch 'imgproxy_ssl_whitelist_tweaks' into 'master'

af_zz_imgproxy optional SSL whitelist tweaks

See merge request !51
This commit is contained in:
Andrew Dolgov
2017-04-23 23:31:32 +03:00

View File

@@ -124,10 +124,14 @@ class Af_Zz_ImgProxy extends Plugin {
$parts = parse_url($url);
foreach (explode(" " , $this->ssl_known_whitelist) as $host) {
if (strpos($parts['host'], $host) !== FALSE) {
if (substr(strtolower($parts['host']), -strlen($host)) === strtolower($host)) {
$parts['scheme'] = 'https';
return build_url($parts);
$url = build_url($parts);
if ($all_remote && $is_remote) {
break;
} else {
return $url;
}
}
}