Skip to content
Snippets Groups Projects
Commit ec20fa61 authored by David Siegfried's avatar David Siegfried Committed by Jan-Hendrik Willms
Browse files

added wildcard support to HTTP_PROXY_IGNORE, fixes #582

Closes #582
parent 99fdab83
No related branches found
No related tags found
No related merge requests found
...@@ -1817,8 +1817,12 @@ function get_default_http_stream_context($url = '') ...@@ -1817,8 +1817,12 @@ function get_default_http_stream_context($url = '')
} }
$host = $purl['host']; $host = $purl['host'];
$whitelist = array_filter(array_map('trim', explode(',', Config::get()->HTTP_PROXY_IGNORE))); $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) { if ($proxy) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Finish editing this message first!
Please register or to comment