Skip to content

Commit

Permalink
some cleanup
Browse files Browse the repository at this point in the history
  • Loading branch information
aheinze committed Feb 13, 2019
1 parent 243a39e commit f153c6a
Show file tree
Hide file tree
Showing 2 changed files with 9 additions and 4 deletions.
11 changes: 8 additions & 3 deletions bootstrap.php
Expand Up @@ -13,13 +13,18 @@
*/
define('COCKPIT_START_TIME', microtime(true));

// Autoload vendor libs
include(__DIR__.'/lib/vendor/autoload.php');

if (!defined('COCKPIT_CLI')) {
define('COCKPIT_CLI', PHP_SAPI == 'cli');
}

// Autoload vendor libs
include(__DIR__.'/lib/vendor/autoload.php');

// include core classes for better performance
include(__DIR__.'/lib/Lime/App.php');
include(__DIR__.'/lib/LimeExtra/App.php');
include(__DIR__.'/lib/LimeExtra/Controller.php');

/*
* Autoload from lib folder (PSR-0)
*/
Expand Down
2 changes: 1 addition & 1 deletion index.php
Expand Up @@ -38,7 +38,7 @@
header('Access-Control-Allow-Methods: ' .($_cors['allowedMethods'] ?? 'PUT, POST, GET, OPTIONS, DELETE'));
header('Access-Control-Expose-Headers: ' .($_cors['exposedHeaders'] ?? 'true'));

if ($_SERVER['REQUEST_METHOD'] == 'OPTIONS') {
if (isset($_SERVER['REQUEST_METHOD']) && $_SERVER['REQUEST_METHOD'] == 'OPTIONS') {
exit(0);
}
}
Expand Down

0 comments on commit f153c6a

Please sign in to comment.