cors.php 1.6 KB

1234567891011121314151617181920212223242526272829303132333435363738394041424344454647484950515253545556575859606162
  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. '.well-known/*'
  23. ],
  24. /*
  25. * Matches the request method. `[*]` allows all methods.
  26. */
  27. 'allowed_methods' => ['*'],
  28. /*
  29. * Matches the request origin. `[*]` allows all origins. Wildcards can be used, eg `*.mydomain.com`
  30. */
  31. 'allowed_origins' => ['*'],
  32. /*
  33. * Patterns that can be used with `preg_match` to match the origin.
  34. */
  35. 'allowed_origins_patterns' => [],
  36. /*
  37. * Sets the Access-Control-Allow-Headers response header. `[*]` allows all headers.
  38. */
  39. 'allowed_headers' => ['*'],
  40. /*
  41. * Sets the Access-Control-Expose-Headers response header with these headers.
  42. */
  43. 'exposed_headers' => [],
  44. /*
  45. * Sets the Access-Control-Max-Age response header when > 0.
  46. */
  47. 'max_age' => 0,
  48. /*
  49. * Sets the Access-Control-Allow-Credentials header.
  50. */
  51. 'supports_credentials' => false,
  52. ];