public function PantheonCurl::createHandle in Search API Pantheon 8
File
- src/
Solarium/ PantheonCurl.php, line 16 - Override Solarium so that more options can be set before executing curl.
Class
Namespace
Drupal\search_api_pantheon\SolariumCode
public function createHandle($request, $endpoint) {
$handler = parent::createHandle($request, $endpoint);
if (defined('PANTHEON_ENVIRONMENT')) {
curl_setopt($handler, CURLOPT_SSL_VERIFYPEER, FALSE);
$client_cert = $_SERVER['HOME'] . '/certs/binding.pem';
curl_setopt($handler, CURLOPT_SSLCERT, $client_cert);
}
return $handler;
}