public/index.php line 11

Open in your IDE?
  1. <?php
  2. //header('Access-Control-Allow-Origin: *');
  3. header("Access-Control-Allow-Headers: X-API-KEY, Origin, X-Requested-With, Content-Type, Accept, Access-Control-Request-Method");
  4. header("Access-Control-Allow-Methods: GET, POST, OPTIONS, PUT, DELETE");
  5. header("Allow: GET, POST, OPTIONS, PUT, DELETE");
  6. use App\Kernel;
  7. require_once dirname(__DIR__).'/vendor/autoload_runtime.php';
  8. return function (array $context) {
  9.      //@TODO posiblemente se tenga que cambiar esto para evitar problemas de seguridad futuros
  10.      $method $_SERVER['REQUEST_METHOD'];
  11.      if ($method == "OPTIONS") {
  12.          die();
  13.      }
  14.     date_default_timezone_set('America/Guatemala');
  15.     return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
  16. };