index.php 2.1 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960616263646566
  1. <?php
  2. /**
  3. * Laravel - A PHP Framework For Web Artisans
  4. *
  5. * @package Laravel
  6. * @author Taylor Otwell <taylor@laravel.com>
  7. */
  8. header('Access-Control-Allow-Origin: https://rencai.jiangzi.xin');
  9. header("Access-Control-Allow-Methods:GET, POST, OPTIONS, DELETE");
  10. header("Access-Control-Allow-Headers:*");
  11. header('Referrer-Policy: origin');
  12. header('Strict-Transport-Security:max-age=180');
  13. header('X-Download-Options: noopen');
  14. header('X-Permitted-Cross-Domain-Policies: none');
  15. define('LARAVEL_START', microtime(true));
  16. /*
  17. |--------------------------------------------------------------------------
  18. | Register The Auto Loader
  19. |--------------------------------------------------------------------------
  20. |
  21. | Composer provides a convenient, automatically generated class loader for
  22. | our application. We just need to utilize it! We'll simply require it
  23. | into the script here so that we don't have to worry about manual
  24. | loading any of our classes later on. It feels great to relax.
  25. |
  26. */
  27. require __DIR__.'/../vendor/autoload.php';
  28. /*
  29. |--------------------------------------------------------------------------
  30. | Turn On The Lights
  31. |--------------------------------------------------------------------------
  32. |
  33. | We need to illuminate PHP development, so let us turn on the lights.
  34. | This bootstraps the framework and gets it ready for use, then it
  35. | will load up this application so that we can run it and send
  36. | the responses back to the browser and delight our users.
  37. |
  38. */
  39. $app = require_once __DIR__.'/../bootstrap/app.php';
  40. /*
  41. |--------------------------------------------------------------------------
  42. | Run The Application
  43. |--------------------------------------------------------------------------
  44. |
  45. | Once we have the application, we can handle the incoming request
  46. | through the kernel, and send the associated response back to
  47. | the client's browser allowing them to enjoy the creative
  48. | and wonderful application we have prepared for them.
  49. |
  50. */
  51. $kernel = $app->make(Illuminate\Contracts\Http\Kernel::class);
  52. $response = $kernel->handle(
  53. $request = Illuminate\Http\Request::capture()
  54. );
  55. $response->send();
  56. $kernel->terminate($request, $response);