fruitcake/php-cors
Standalone PHP CORS library and Symfony HttpFoundation middleware implementing the W3C CORS spec. Configure allowed origins, methods, headers, exposed headers, and max-age; supports regex origin patterns. Used by Stack and Laravel integrations.
Architecture fit is strong due to Symfony HttpFoundation compatibility, which Laravel natively uses. The package is framework-agnostic but integrates seamlessly via the dedicated fruitcake/laravel-cors wrapper for Laravel projects. Integration feasibility is high for Laravel (via wrapper) or direct use (custom middleware), with clear method-based usage patterns. Technical risk is low-moderate: 100% test coverage and PHPStan Level 10 ensure quality, but "0 dependents" is misleading (it's a dependency of fruitcake/laravel-cors, which has significant usage). Key questions: 1) How does the Laravel wrapper handle version-specific edge cases (e.g., Laravel 11+ middleware changes), 2) What are real-world failure scenarios for dynamic origin patterns (e.g., regex conflicts), and 3) Is active support maintained for the Laravel wrapper beyond the core library?
Stack fit is optimal for Laravel via fruitcake/laravel-cors, which integrates
How can I help you explore Laravel packages today?