cors.php 1.5 KB

123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354555657585960
  1. <?php
  2. return [
  3. /*
  4. |--------------------------------------------------------------------------
  5. | Laravel CORS Options
  6. |--------------------------------------------------------------------------
  7. |
  8. | The allowed_methods and allowed_headers options are case-insensitive.
  9. |
  10. | You don't need to provide both allowed_origins and allowed_origins_patterns.
  11. | If one of the strings passed matches, it is considered a valid origin.
  12. |
  13. | If array('*') is provided to allowed_methods, allowed_origins or allowed_headers
  14. | all methods / origins / headers are allowed.
  15. |
  16. */
  17. /*
  18. * You can enable CORS for 1 or multiple paths.
  19. * Example: ['api/*']
  20. */
  21. 'paths' => [],
  22. /*
  23. * Matches the request method. `[*]` allows all methods.
  24. */
  25. 'allowed_methods' => ['*'],
  26. /*
  27. * Matches the request origin. `[*]` allows all origins.
  28. */
  29. 'allowed_origins' => ['*'],
  30. /*
  31. * Matches the request origin with, similar to `Request::is()`
  32. */
  33. 'allowed_origins_patterns' => [],
  34. /*
  35. * Sets the Access-Control-Allow-Headers response header. `[*]` allows all headers.
  36. */
  37. 'allowed_headers' => ['*'],
  38. /*
  39. * Sets the Access-Control-Expose-Headers response header.
  40. */
  41. 'exposed_headers' => false,
  42. /*
  43. * Sets the Access-Control-Max-Age response header.
  44. */
  45. 'max_age' => false,
  46. /*
  47. * Sets the Access-Control-Allow-Credentials header.
  48. */
  49. 'supports_credentials' => false,
  50. ];