Last active
October 17, 2017 13:44
-
-
Save ahebrank/1d990fc677e940d97aec1460f31b8edf to your computer and use it in GitHub Desktop.
Pantheon solr patch
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
| diff --git a/src/Plugin/SolrConnector/PantheonSolrConnector.php b/src/Plugin/SolrConnector/PantheonSolrConnector.php | |
| index e4702b8..fd45a30 100644 | |
| --- a/src/Plugin/SolrConnector/PantheonSolrConnector.php | |
| +++ b/src/Plugin/SolrConnector/PantheonSolrConnector.php | |
| @@ -71,6 +71,14 @@ class PantheonSolrConnector extends StandardSolrConnector { | |
| 'path' => '/sites/self/environments/' . $_ENV['PANTHEON_ENVIRONMENT'] . '/index', | |
| ]; | |
| } | |
| + else { | |
| + $pantheon_specific_configuration = [ | |
| + 'scheme' => 'https', | |
| + 'host' => 'solr', # docker network hostname | |
| + 'port' => 449, | |
| + 'path' => '/sites/self/environments/kalabox/index', | |
| + ]; | |
| + } | |
| return $pantheon_specific_configuration + parent::defaultConfiguration(); | |
| } | |
| diff --git a/src/Solarium/PantheonCurl.php b/src/Solarium/PantheonCurl.php | |
| index 3837447..d1e5d90 100644 | |
| --- a/src/Solarium/PantheonCurl.php | |
| +++ b/src/Solarium/PantheonCurl.php | |
| @@ -20,6 +20,11 @@ class PantheonCurl extends Curl { | |
| $client_cert = $_SERVER['HOME'] . '/certs/binding.pem'; | |
| curl_setopt($handler, CURLOPT_SSLCERT, $client_cert); | |
| } | |
| + else { | |
| + curl_setopt($handler, CURLOPT_SSL_VERIFYPEER, FALSE); | |
| + $client_cert = '/certs/solr.pem'; | |
| + curl_setopt($handler, CURLOPT_SSLCERT, $client_cert); | |
| + } | |
| return $handler; | |
| } | |
| } |
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment