42 lines
913 B
Plaintext
42 lines
913 B
Plaintext
<?php
|
|
|
|
/**
|
|
* CORS Configuration Example
|
|
*
|
|
* Copy this to config/cors.php in your Laravel app if you need
|
|
* to customize CORS settings beyond the defaults.
|
|
*/
|
|
|
|
return [
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Cross-Origin Resource Sharing (CORS) Configuration
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Settings for handling Cross-Origin Resource Sharing (CORS).
|
|
| Adjust these based on your API requirements.
|
|
|
|
|
*/
|
|
|
|
'paths' => ['api/*', 'sanctum/csrf-cookie'],
|
|
|
|
'allowed_methods' => ['*'],
|
|
|
|
'allowed_origins' => [
|
|
env('FRONTEND_URL', 'http://localhost:3000'),
|
|
// Add other allowed origins here
|
|
],
|
|
|
|
'allowed_origins_patterns' => [],
|
|
|
|
'allowed_headers' => ['*'],
|
|
|
|
'exposed_headers' => [],
|
|
|
|
'max_age' => 0,
|
|
|
|
'supports_credentials' => true,
|
|
|
|
];
|