diff options
| author | Philipp Schüttlöffel <schuettloeffel@zqs.uni-hannover.de> | 2022-02-08 11:40:46 +0000 |
|---|---|---|
| committer | David Siegfried <david.siegfried@uni-vechta.de> | 2022-02-08 11:40:46 +0000 |
| commit | e6ddc2bc683dc62df73ab79722b6fa7f4be3553e (patch) | |
| tree | bf6a95ecd1db5e0100bcaad27e422ac0393c8ed3 /lib/functions.php | |
| parent | 87e95bcdb5627b7eb1eaf8fd8fb458bb73e4f85e (diff) | |
added wildcard support to HTTP_PROXY_IGNORE, fixes #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 96dd955..85bfd5e 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) { |
