summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
-rw-r--r--plugins/af_zz_imgproxy/init.php10
1 files changed, 7 insertions, 3 deletions
diff --git a/plugins/af_zz_imgproxy/init.php b/plugins/af_zz_imgproxy/init.php
index 5fab3b7b8..86f79c694 100644
--- a/plugins/af_zz_imgproxy/init.php
+++ b/plugins/af_zz_imgproxy/init.php
@@ -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;
+ }
}
}