MDL-83979 repository_url: Always use the proxy for url downloads

This commit is contained in:
Brendan Heywood
2025-04-09 14:44:54 +10:00
parent 44fabe1c3d
commit a627b10f0c
+7 -2
View File
@@ -150,8 +150,13 @@ EOD;
return;
}
$this->processedfiles[] = $url;
$curl = new curl;
$curl->setopt(array('CURLOPT_FOLLOWLOCATION' => true, 'CURLOPT_MAXREDIRS' => 3));
$curl = new curl([
'proxy' => true,
]);
$curl->setopt([
'CURLOPT_FOLLOWLOCATION' => true,
'CURLOPT_MAXREDIRS' => 3,
]);
$msg = $curl->head($url);
$info = $curl->get_info();
if ($info['http_code'] != 200) {