|
|
@ -35,6 +35,7 @@ function fulcrm_apiv2_prevent_loop( $headers ) {
|
|
|
|
|
|
|
|
|
|
|
|
if ( array_key_exists( 'X-fulcrm-Client-ID', $headers ) ) {
|
|
|
|
if ( array_key_exists( 'X-fulcrm-Client-ID', $headers ) ) {
|
|
|
|
$incoming_client_ids = array_map( "trim", explode( ',', $headers[ 'X-fulcrm-Client-ID' ] ) );
|
|
|
|
$incoming_client_ids = array_map( "trim", explode( ',', $headers[ 'X-fulcrm-Client-ID' ] ) );
|
|
|
|
|
|
|
|
$client_id = variable_get( 'fulcrm_apiv2_client_id', $GLOBALS[ 'base_url' ] );
|
|
|
|
if ( in_array( $client_id, $incoming_client_ids ) )
|
|
|
|
if ( in_array( $client_id, $incoming_client_ids ) )
|
|
|
|
return false;
|
|
|
|
return false;
|
|
|
|
} else {
|
|
|
|
} else {
|
|
|
|