123456789101112131415161718192021222324252627282930313233343536373839404142434445464748495051525354 |
- <?php
- return [
-
- 'paths' => [
- '*',
- 'api/*',
- 'sanctum/csrf-cookie',
- 'login',
- 'register',
- ],
-
- 'allowed_methods' => ['*', 'GET', 'POST', 'PUT', 'PATCH', 'DELETE', 'OPTIONS'],
-
- 'allowed_origins' => [
- '*',
- 'http://127.0.0.1',
- 'http://localhost',
- env('APP_ENV') === 'local'
- ? ['http://localhost:3000', 'http://localhost:8080', 'http://127.0.0.1:8000', '*']
- : [env('FRONTEND_URL'), '*'],
- ],
-
- 'allowed_origins_patterns' => [
-
- ],
-
- 'allowed_headers' => [
- '*',
- 'Accept',
- 'Authorization',
- 'Content-Type',
- 'X-Requested-With',
- 'X-CSRF-TOKEN',
- 'X-Custom-Header',
- env('APP_ENV') === 'local' ? 'X-Debug-Token' : null,
- ],
-
- 'exposed_headers' => [
- '*',
- 'X-Custom-Response-Header',
- ],
-
- 'max_age' => 86400,
-
- 'supports_credentials' => env('CORS_SUPPORTS_CREDENTIALS', true),
- ];
|