diff --git a/lib/functions.php b/lib/functions.php index 6a73fc821035b6bdc3eb1a51adba358cda0fe537..5d3d2bca50a81259f2009331c423d50411d3d64c 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -1817,8 +1817,12 @@ function get_default_http_stream_context($url = '') } $host = $purl['host']; $whitelist = array_filter(array_map('trim', explode(',', Config::get()->HTTP_PROXY_IGNORE))); - if (in_array($host, $whitelist)) { - $proxy = ''; + + foreach ($whitelist as $whitehost) { + if (fnmatch($whitehost, $host)) { + $proxy = ''; + break; + } } } if ($proxy) {