Merge branch 'MDL-76370-publicpaths-proxying-MOODLE_400_STABLE' of https://github.com/jaydn/moodle into MOODLE_400_STABLE

This commit is contained in:
Paul Holden
2023-02-06 11:02:48 +00:00
+8 -1
View File
@@ -3182,7 +3182,14 @@ class curl {
$this->proxy_type = CURLPROXY_SOCKS5;
} else {
$this->proxy_type = CURLPROXY_HTTP;
$this->setopt(array('httpproxytunnel'=>false));
$this->setopt([
'httpproxytunnel' => false,
]);
if (defined('CURLOPT_SUPPRESS_CONNECT_HEADERS')) {
$this->setopt([
'suppress_connect_headers' => true,
]);
}
}
$this->setopt(array('proxytype'=>$this->proxy_type));
}