diff --git a/flight/Flight.php b/flight/Flight.php index 84a239b..f5056ac 100644 --- a/flight/Flight.php +++ b/flight/Flight.php @@ -437,7 +437,7 @@ class Flight { } // Disable caching for AJAX requests - if (self::request()->isAjax) { + if (self::request()->ajax) { self::response()->cache(false); } diff --git a/flight/Request.php b/flight/Request.php index 0a74e57..44dd005 100644 --- a/flight/Request.php +++ b/flight/Request.php @@ -20,8 +20,13 @@ class Request { 'base' => str_replace('\\', '/', dirname($_SERVER['SCRIPT_NAME'])), 'method' => $_SERVER['REQUEST_METHOD'], 'referrer' => $_SERVER['HTTP_REFERER'], - 'ipAddress' => $_SERVER['REMOTE_ADDR'], - 'isAjax' => ($_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest'), + 'ip' => $_SERVER['REMOTE_ADDR'], + 'ajax' => ($_SERVER['HTTP_X_REQUESTED_WITH'] == 'XMLHttpRequest'), + 'scheme' => $_SERVER['SERVER_PROTOCOL'], + 'user_agent' => $_SERVER['HTTP_USER_AGENT'], + 'body' => file_get_contents('php://input'), + 'type' => $_SERVER['CONTENT_TYPE'], + 'length' => $_SERVER['CONTENT_LENGTH'], 'query' => array(), 'data' => $_POST, 'cookies' => $_COOKIE,