diff --git a/lib/filelib.php b/lib/filelib.php index 3e549904ef2..c965d273b51 100644 --- a/lib/filelib.php +++ b/lib/filelib.php @@ -3078,6 +3078,12 @@ class curl { } curl_setopt($curl, CURLOPT_HTTPHEADER, $this->header); + // Bypass proxy (for this request only) if required. + if (!empty($this->options['CURLOPT_URL']) && + is_proxybypass($this->options['CURLOPT_URL'])) { + unset($this->options['CURLOPT_PROXY']); + } + if ($this->debug){ echo '