Updated laravel-cors. Closes #1485

This commit is contained in:
James Brooks
2016-02-24 12:32:39 +00:00
committed by Graham Campbell
parent e8cbd81ad0
commit 4deff42aff
4 changed files with 29 additions and 95 deletions

View File

@@ -10,37 +10,20 @@
*/
return [
/*
|--------------------------------------------------------------------------
| Laravel CORS Defaults
| Laravel CORS
|--------------------------------------------------------------------------
|
| The defaults are the default values applied to all the paths that match,
| unless overridden in a specific URL configuration.
| If you want them to apply to everything, you must define a path with *.
|
| allowedOrigins, allowedHeaders and allowedMethods can be set to ['*']
| to accept any value, the allowed methods however have to be explicitly listed.
| allowedOrigins, allowedHeaders and allowedMethods can be set to array('*')
| to accept any value.
|
*/
'defaults' => [
'supportsCredentials' => true,
'allowedOrigins' => ['*'],
'allowedHeaders' => [],
'allowedMethods' => [],
'exposedHeaders' => [],
'maxAge' => 0,
'hosts' => [],
],
'paths' => [
'api/v1/*' => [
'allowedOrigins' => [],
'allowedHeaders' => ['X-Cachet-Token'],
'allowedMethods' => ['*'],
'maxAge' => 3600,
],
],
'supportsCredentials' => false,
'allowedOrigins' => ['*'],
'allowedHeaders' => ['X-Cachet-Token'],
'allowedMethods' => ['*'],
'exposedHeaders' => [],
'maxAge' => 3600,
'hosts' => [],
];