index.php 2.3 KB

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