protected function get_blacklisted_hosts() {
        global $CFG;
        if (!isset($CFG->curlsecurityblockedhosts)) {
            return [];
        }
        return array_filter(array_map('trim', explode("\n", $CFG->curlsecurityblockedhosts)), function($entry) {
            return !empty($entry);
        });
    }