Skip to content

Commit

Permalink
MDL-63789 search_solr: use proxy creds, if any
Browse files Browse the repository at this point in the history
Also use proxy port, IF any.
  • Loading branch information
scara committed Nov 2, 2018
1 parent 8b019fb commit 13719f2
Showing 1 changed file with 7 additions and 1 deletion.
8 changes: 7 additions & 1 deletion search/engine/solr/classes/engine.php
Expand Up @@ -1257,7 +1257,13 @@ protected function get_search_client($triggerexception = true) {

if ($CFG->proxyhost && !is_proxybypass('http://' . $this->config->server_hostname . '/')) {
$options['proxy_host'] = $CFG->proxyhost;
$options['proxy_port'] = $CFG->proxyport;
if (!empty($CFG->proxyport)) {
$options['proxy_port'] = $CFG->proxyport;
}
if (!empty($CFG->proxyuser) && !empty($CFG->proxypassword)) {
$options['proxy_login'] = $CFG->proxyuser;
$options['proxy_password'] = $CFG->proxypassword;
}
}

if (!class_exists('\SolrClient')) {
Expand Down

0 comments on commit 13719f2

Please sign in to comment.