diff --git a/auth/cas/auth.php b/auth/cas/auth.php index eaf3f6c9ffa..22733b2a821 100644 --- a/auth/cas/auth.php +++ b/auth/cas/auth.php @@ -187,7 +187,7 @@ class auth_plugin_cas extends auth_plugin_ldap { } // If Moodle is configured to use a proxy, phpCAS needs some curl options set. - if (!empty($CFG->proxyhost) && !is_proxybypass($this->config->hostname)) { + if (!empty($CFG->proxyhost) && !is_proxybypass(phpCAS::getServerLoginURL())) { phpCAS::setExtraCurlOption(CURLOPT_PROXY, $CFG->proxyhost); if (!empty($CFG->proxyport)) { phpCAS::setExtraCurlOption(CURLOPT_PROXYPORT, $CFG->proxyport);