diff options
| author | David Siegfried <david.siegfried@uni-vechta.de> | 2022-05-02 08:47:10 +0000 |
|---|---|---|
| committer | Jan-Hendrik Willms <tleilax+studip@gmail.com> | 2022-05-02 08:47:10 +0000 |
| commit | ec20fa61634a36c2ec80d30f2d02001dcfa738d4 (patch) | |
| tree | c489f3043f3e4193aa1bfc53b8da1a06883035ea /lib/functions.php | |
| parent | 99fdab83f345f088e66daa066252f22156ce40c4 (diff) | |
added wildcard support to HTTP_PROXY_IGNORE, fixes #582
Closes #582
Diffstat (limited to 'lib/functions.php')
| -rw-r--r-- | lib/functions.php | 8 |
1 files changed, 6 insertions, 2 deletions
diff --git a/lib/functions.php b/lib/functions.php index 6a73fc8..5d3d2bc 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) { |
