13 if (strtoupper(
$_SERVER[
"REQUEST_METHOD"]) ==
"OPTIONS") {
14 header(
'HTTP/1.1 204 No Content');
15 header(
'Access-Control-Allow-Origin: '.
$_SERVER[
"HTTP_ORIGIN"]);
16 header(
'Access-Control-Allow-Credentials: true');
17 header(
'Access-Control-Allow-Methods: GET, POST, PUT, DELETE, OPTIONS');
18 header(
'Access-Control-Allow-Headers: X-Experience-API-Version,Accept,Authorization,Etag,Cache-Control,Content-Type,DNT,If-Modified-Since,Keep-Alive,Origin,User-Agent,X-Mx-ReqToken,X-Requested-With');
32 elseif( !empty(
$_SERVER[
'HTTP_AUTHORIZATION']) )
34 $basicAuth = explode(
':' , base64_decode(substr(
$_SERVER[
'HTTP_AUTHORIZATION'], 6)));
40 header(
'HTTP/1.1 401 Authorization Required');
55 chdir(
"../../../../../../../");
64 require_once __DIR__.
'/classes/XapiProxy/DataService.php';
70 require_once __DIR__.
'/classes/XapiProxy/XapiProxy.php';
81 $dic[
'xapiproxy']->initLrs();
84 $dic[
'xapiproxy']->log()->error(
$dic[
'xapiproxy']->getLogMessage($e->getMessage()));
87 require_once __DIR__.
'/classes/XapiProxy/XapiProxyRequest.php';
88 require_once __DIR__.
'/classes/XapiProxy/XapiProxyResponse.php';
92 $dic[
'xapiproxy']->setXapiProxyRequest(
$req);
93 $dic[
'xapiproxy']->setXapiProxyResponse(
$resp);
if($_SERVER['argc']< 4) $client
static initIlias($client_id)
if(!defined('PATH_SEPARATOR')) $GLOBALS['_PEAR_default_error_mode']