GitHub RepositoryOpen SourceMITLaravelPHPDemo AvailableExternal Project

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.

Stars
6.2K
Forks
607
Watchers
6.2K
Open Issues
37
fruitcake/laravel-cors

Repository Details

Repository
fruitcake/laravel-cors
Framework
Laravel
Primary Language
PHP
Content Language
English
License
MIT
Stars
6.2K
Forks
607
Watchers
6.2K
Open Issues
37
Default Branch
master
Last Synced
25 Jun 2026
Repository Status
draft_created

Repository Description

AI Summary

Adds CORS (Cross-Origin Resource Sharing) headers support in your Laravel application

Original Repository Description

Adds CORS (Cross-Origin Resource Sharing) headers support in your Laravel application

README Preview

# CORS Middleware for Laravel [![Build Status][ico-actions]][link-actions] [![Latest Stable Version](https://poser.pugx.org/fruitcake/laravel-cors/version.png)](https://packagist.org/packages/fruitcake/laravel-cors) [![Software License][ico-license]](LICENSE.md) [![Total Downloads][ico-downloads]][link-downloads] [![Fruitcake](https://img.shields.io/badge/Powered%20By-Fruitcake-b2bc35.svg)](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

LaravelPHPMITmiddlewarecorshacktoberfest

Related Repositories

Product Discussion

Ask questions or discuss this product. New comments are reviewed before publishing.

0 comments

Loading comments...

Explore

WOCSOL services and marketplace

Account

Sign in or create an account to manage downloads, orders, and support.