Skip to content
Snippets Groups Projects
Commit e6ddc2bc authored by Philipp Schüttlöffel's avatar Philipp Schüttlöffel Committed by David Siegfried
Browse files

added wildcard support to HTTP_PROXY_IGNORE, fixes #582

parent 87e95bcd
No related branches found
No related tags found
No related merge requests found
......@@ -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) {
......
0% Loading or .
You are about to add 0 people to the discussion. Proceed with caution.
Please register or to comment