ldc-legaulois/config/cors.php

67 lines
1.8 KiB
PHP
Raw Normal View History

2020-07-23 10:29:36 +02:00
<?php
return [
/*
2022-02-10 16:14:58 +01:00
|--------------------------------------------------------------------------
| Laravel CORS Options
|--------------------------------------------------------------------------
|
| The allowed_methods and allowed_headers options are case-insensitive.
|
| You don't need to provide both allowed_origins and allowed_origins_patterns.
| If one of the strings passed matches, it is considered a valid origin.
|
| If ['*'] is provided to allowed_methods, allowed_origins or allowed_headers
| all methods / origins / headers are allowed.
|
2020-07-23 10:29:36 +02:00
*/
2021-04-29 12:46:06 +02:00
/*
* You can enable CORS for 1 or multiple paths.
* Example: ['api/*']
*/
'paths' => ['*'],
2020-07-23 10:29:36 +02:00
2021-04-29 12:46:06 +02:00
/*
2022-02-10 16:14:58 +01:00
* Matches the request method. `['*']` allows all methods.
*/
2020-07-23 10:29:36 +02:00
'allowed_methods' => ['*'],
2021-04-29 12:46:06 +02:00
/*
* Matches the request origin. `['*']` allows all origins. Wildcards can be used, eg `*.mydomain.com`
*/
'allowed_origins' => ['*'],
2020-07-23 10:29:36 +02:00
2021-04-29 12:46:06 +02:00
/*
* Patterns that can be used with `preg_match` to match the origin.
*/
'allowed_origins_patterns' => [
'http:\/\/legaulois2020\.test',
'https:\/\/dev\.legaulois\.fr',
'https:\/\//www\.legaulois\.fr',
2022-02-10 16:14:58 +01:00
'https:\/\/[a-z0-9\-\.]*\.sips-atos\.com'
// Mercanet
2021-04-29 12:46:06 +02:00
],
2020-07-23 10:29:36 +02:00
2021-04-29 12:46:06 +02:00
/*
* Sets the Access-Control-Allow-Headers response header. `['*']` allows all headers.
*/
2020-07-23 10:29:36 +02:00
'allowed_headers' => ['*'],
2021-04-29 12:46:06 +02:00
/*
* Sets the Access-Control-Expose-Headers response header with these headers.
*/
2020-07-23 10:29:36 +02:00
'exposed_headers' => [],
2021-04-29 12:46:06 +02:00
/*
* Sets the Access-Control-Max-Age response header when > 0.
*/
2020-07-23 10:29:36 +02:00
'max_age' => 0,
2021-04-29 12:46:06 +02:00
/*
* Sets the Access-Control-Allow-Credentials header.
*/
2020-07-23 10:29:36 +02:00
'supports_credentials' => false,
];