public/index.php line 17

Open in your IDE?
  1. <?php
  2. use App\Kernel;
  3. header('Access-Control-Allow-Origin: *');
  4. header("Access-Control-Allow-Headers: X-API-KEY, Origin, X-Requested-With, Content-Type, Accept, Access-Control-Request-Method, Authorization, Cache-Control");
  5. header("Access-Control-Expose-Headers: Content-Length, X-JSON");
  6. header("Access-Control-Allow-Methods: GET, POST, OPTIONS, PUT, DELETE");
  7. header("Allow: GET, POST, OPTIONS, PUT, DELETE");
  8. if ($_SERVER['REQUEST_METHOD'] === 'OPTIONS') {
  9.     // The request is using the POST method
  10.     header("HTTP/1.1 200 OK");
  11.     return;
  12. }
  13. require_once dirname(__DIR__) . '/vendor/autoload_runtime.php';
  14. return function (array $context) {
  15.     return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
  16. };