fruitcake/laravel-cors
Laravel middleware to handle Cross-Origin Resource Sharing (CORS). Configure allowed origins, methods, headers, credentials, and exposed headers via a config file. Adds proper CORS response headers and supports preflight OPTIONS requests for APIs and SPAs.
Architecture fit is strong for Laravel applications requiring CORS headers, as it implements standard middleware-based handling and aligns with Laravel's request lifecycle. Integration feasibility is high for Laravel 6-9 versions per composer.json constraints but fails for Laravel 10+ due to unsupported dependencies. Technical risk is high due to the repository being officially archived (no active maintenance), lack of recent releases since 2022, and potential unaddressed security vulnerabilities. Key questions: Are there active community forks addressing Laravel 10+ compatibility? Has the package been audited for security issues in recent years? What is the recommended alternative for new projects?
Stack fit is optimal for Laravel 6-9 but incompatible with Laravel 10+ due to illuminate/support version constraints. Migration path for existing projects requires careful version alignment: projects on Laravel 6-9 can integrate via composer require fruitcake/laravel-cors and publish config, but must avoid future Laravel upgrades. For new projects, this package should not be used—alternative packages like spatie/laravel-cors or Laravel's native CORS handling (via api middleware) are safer choices. Sequencing would involve installing, configuring origins/patterns in config/cors.php, and adding middleware to kernel, but this is only viable for legacy Laravel 6-9 systems.
Maintenance burden is significant due to the archived status—no official patches for bugs, security flaws, or new Laravel features. Support relies entirely on community forums (e.g., GitHub issues), which may be slow or inactive. Scaling is generally low-risk for traffic as CORS headers are lightweight, but unaddressed memory leaks (like the Octane-related fix in v2.0.4) could resurface in high-load environments. Failure modes include misconfigured CORS policies blocking legitimate requests or exposing security vulnerabilities if headers are improperly set. Ramp-up is simple for basic use cases but becomes complex for advanced scenarios due to outdated documentation and lack of official support for modern Laravel versions.
How can I help you explore Laravel packages today?