public/index.php line 15

  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("Set-Cookie: key=value; path=/; domain=admin-pro.media-t-testing.ovh; HttpOnly; SameSite=None");
  6. header("Allow: GET, POST, OPTIONS, PUT, DELETE");
  7. $method $_SERVER['REQUEST_METHOD'];
  8. if ($method == "OPTIONS") {
  9.     die();
  10. }
  11. use App\Kernel;
  12. require_once dirname(__DIR__) . '/vendor/autoload_runtime.php';
  13. return function (array $context) {
  14.     return new Kernel($context['APP_ENV'], (bool) $context['APP_DEBUG']);
  15. };