templave v1
This commit is contained in:
41
src/config/cors.php.example
Normal file
41
src/config/cors.php.example
Normal file
@@ -0,0 +1,41 @@
|
||||
<?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,
|
||||
|
||||
];
|
||||
Reference in New Issue
Block a user