Merge branch 'MDL-83979-url-always-proxy-MOODLE_404_STABLE' of https://github.com/brendanheywood/moodle into MOODLE_404_STABLE

This commit is contained in:
Jun Pataleta
2025-04-15 20:43:43 +08:00
+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) {