fruitcake/laravel-cors
This is an external open-source GitHub repository imported into the WOCSOL Marketplace for discovery. The original repository owner is the primary creator.
Repository Details
Repository Description
Adds CORS (Cross-Origin Resource Sharing) headers support in your Laravel application
Adds CORS (Cross-Origin Resource Sharing) headers support in your Laravel application
# CORS Middleware for Laravel [![Build Status][ico-actions]][link-actions] [](https://packagist.org/packages/fruitcake/laravel-cors) [![Software License][ico-license]](LICENSE.md) [![Total Downloads][ico-downloads]][link-downloads] [](https://fruitcake.nl/) Implements https://github.com/fruitcake/php-cors for Laravel ## Note for users upgrading to Laravel 9, 10 or higher ### This package is deprecated because all supported Laravel versions now include the CORS middleware in the core. Since Laravel 9.2, this Middleware is included in laravel/framework. You can use the provided middleware, which should be compatible with the Middleware and config provided in this package. See https://github.com/laravel/laravel/pull/5825/files for the changes. Steps to upgrade: 1. Remove `"fruitcake/laravel-cors"` from your composer.json 2. Replace `\Fruitcake\Cors\HandleCors::class,` with `\Illuminate\Http\Middleware\HandleCors::class,` in `app/Http/Kernel.php` See `https://github.com/fruitcake/php-cors` for advanced usage. The config stays the same. ## About The `laravel-cors` package allows you to send [Cross-Origin Resource Sharing](http://enable-cors.org/) headers with Laravel middleware configuration. If you want to have a global overview of CORS workflow, you can browse this [image](http://www.html5rocks.com/static/images/cors_server_flowchart.png). ## Upgrading from 0.x (barryvdh/laravel-cors) When upgrading from 0.x versions, there are some breaking changes: - **A new 'paths' property is used to enable/disable CORS on certain routes. This is empty by default, so fill it correctly!** - **Group middleware is no longer supporte
Related Repositories
Product Discussion
Ask questions or discuss this product. New comments are reviewed before publishing.
Loading comments...