2019-03-01 14:08:34 +08:00
|
|
|
<?php
|
|
|
|
|
|
|
|
return [
|
2022-09-14 18:19:38 +08:00
|
|
|
'allow-credentials' => env('CORS_ALLOW_CREDENTIAILS', true), // set "Access-Control-Allow-Credentials" 👉 string "false" or "true".
|
2019-03-01 14:08:34 +08:00
|
|
|
'allow-headers' => ['*'], // ex: Content-Type, Accept, X-Requested-With
|
|
|
|
'expose-headers' => ['Authorization'],
|
|
|
|
'origins' => ['*'], // ex: http://localhost
|
|
|
|
'methods' => ['*'], // ex: GET, POST, PUT, PATCH, DELETE
|
|
|
|
'max-age' => env('CORS_ACCESS_CONTROL_MAX_AGE', 0),
|
|
|
|
'laravel' => [
|
|
|
|
'allow-route-perfix' => env('CORS_LARAVEL_ALLOW_ROUTE_PERFIX', '*'), // The perfix is using \Illumante\Http\Request::is method. 👉
|
|
|
|
'route-group-mode' => env('CORS_LARAVEL_ROUTE_GROUP_MODE', false),
|
|
|
|
],
|
|
|
|
];
|