- Laravel 12 with Sanctum authentication - API versioning with grazulex/laravel-apiroute - spatie/laravel-query-builder for filtering/sorting - spatie/laravel-data for DTOs - dedoc/scramble for auto API documentation - Pest PHP testing framework - Docker development environment - Standardized JSON API responses - Rate limiting and CORS configuration - Comprehensive README documentation
43 lines
1.0 KiB
PHP
43 lines
1.0 KiB
PHP
<?php
|
|
|
|
return [
|
|
|
|
/*
|
|
|--------------------------------------------------------------------------
|
|
| Cross-Origin Resource Sharing (CORS) Configuration
|
|
|--------------------------------------------------------------------------
|
|
|
|
|
| Here you may configure your settings for cross-origin resource sharing
|
|
| or "CORS". This determines what cross-origin operations may execute
|
|
| in web browsers. You are free to adjust these settings as needed.
|
|
|
|
|
| To learn more: https://developer.mozilla.org/en-US/docs/Web/HTTP/CORS
|
|
|
|
|
*/
|
|
|
|
'paths' => ['api/*', 'sanctum/csrf-cookie'],
|
|
|
|
'allowed_methods' => ['*'],
|
|
|
|
'allowed_origins' => ['*'],
|
|
|
|
'allowed_origins_patterns' => [],
|
|
|
|
'allowed_headers' => ['*'],
|
|
|
|
'exposed_headers' => [
|
|
'X-RateLimit-Limit',
|
|
'X-RateLimit-Remaining',
|
|
'Retry-After',
|
|
'X-API-Version',
|
|
'X-API-Version-Status',
|
|
'Deprecation',
|
|
'Sunset',
|
|
],
|
|
|
|
'max_age' => 86400, // 24 hours
|
|
|
|
'supports_credentials' => false,
|
|
|
|
];
|