Merge 0b9eb900c2 into 6a5cb00131
This commit is contained in:
commit
f9dd097be7
|
|
@ -32,6 +32,9 @@ $proxy_base = 'https://proxy.yourdomain.org';
|
|||
// this should point to the target CiviCRM system
|
||||
$target_civicrm = 'https://your.civicrm.installation.org';
|
||||
|
||||
//if CiviCRM is behind a htaccess authentication, you may set username:password. if empty no auth is used
|
||||
//$target_civicrm_auth = 'username:password';
|
||||
|
||||
|
||||
/****************************************************************
|
||||
** FEATURES / DEFAULT PATHS **
|
||||
|
|
|
|||
|
|
@ -21,6 +21,7 @@ $civiproxy_version = '1.0.0-alpha2';
|
|||
*/
|
||||
function civiproxy_redirect($url_requested, $parameters) {
|
||||
global $target_interface;
|
||||
global $target_civicrm_auth;
|
||||
$url = $url_requested;
|
||||
$curlSession = curl_init();
|
||||
|
||||
|
|
@ -52,6 +53,9 @@ function civiproxy_redirect($url_requested, $parameters) {
|
|||
if (!empty($target_interface)) {
|
||||
curl_setopt($curlSession, CURLOPT_INTERFACE, $target_interface);
|
||||
}
|
||||
if (isset($target_civicrm_auth) and !empty($target_civicrm_auth)) {
|
||||
curl_setopt($ch, CURLOPT_USERPWD, $target_civicrm_auth);
|
||||
}
|
||||
if (file_exists(dirname(__FILE__).'/target.pem')) {
|
||||
curl_setopt($curlSession, CURLOPT_CAINFO, dirname(__FILE__).'/target.pem');
|
||||
}
|
||||
|
|
|
|||
Loading…
Reference in New Issue