From e6ddc2bc683dc62df73ab79722b6fa7f4be3553e Mon Sep 17 00:00:00 2001 From: =?UTF-8?q?Philipp=20Sch=C3=BCttl=C3=B6ffel?= <schuettloeffel@zqs.uni-hannover.de> Date: Tue, 8 Feb 2022 11:40:46 +0000 Subject: [PATCH] added wildcard support to HTTP_PROXY_IGNORE, fixes #582 --- lib/functions.php | 8 ++++++-- 1 file changed, 6 insertions(+), 2 deletions(-) diff --git a/lib/functions.php b/lib/functions.php index 96dd9551731..85bfd5e778b 100644 --- a/lib/functions.php +++ b/lib/functions.php @@ -1816,8 +1816,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) { -- GitLab