mirror of
https://github.com/catalyst/moodle-auth_outage.git
synced 2026-05-16 21:41:31 +02:00
Fix URL is blocked message when not behind a proxy/load balancer
When there is no proxy/load balancer and curlsecurityblockedhosts is set to default (i.e. has 127.0.0.1 in it) fetching the outage page will result in a "The URL is blocked." message. This resolves that issue by passing ignoresecurity to the curl object.
This commit is contained in:
@@ -57,7 +57,7 @@ class outagelib {
|
||||
global $CFG;
|
||||
require_once($CFG->libdir . '/filelib.php');
|
||||
|
||||
$curl = new curl();
|
||||
$curl = new curl(['ignoresecurity' => true]);
|
||||
$contents = $curl->get($file);
|
||||
$info = $curl->get_info();
|
||||
if (!empty($info['content_type'])) {
|
||||
|
||||
Reference in New Issue
Block a user