Home
Docs
GitHub
Pricing
Blog
Log In

Run Sandworm Audit for your App

Get started
Hold on, we're currently generating a fresh version of this report
This package has been abandoned.
Generated on May 17, 2024 via composer

fruitcake/laravel-cors v0.2.3

Adds CORS (Cross-Origin Resource Sharing) headers support in your Laravel application
Package summary
Share
3
issues
2
high severity
meta
2
1
moderate severity
vulnerability
1
1
license
13
MIT
Package created
24 Dec 2019
Version published
11 Jun 2014
Maintainers
1
Total deps
13
Direct deps
2
License
MIT

Issues

3

2 high severity issues

high
via: fruitcake/laravel-cors@v0.2.3
via: asm89/stack-cors@0.2.1
Collapse
Expand

Licenses

MIT License

Permissive
OSI Approved
This is a human-readable summary of (and not a substitute for) the license. Disclaimer.
Can
commercial-use
modify
distribute
sublicense
private-use
Cannot
hold-liable
Must
include-copyright
include-license
13 Packages, Including:
asm89/stack-cors@0.2.1
fruitcake/laravel-cors@v0.2.3
illuminate/support@v4.2.17
psr/log@1.1.4
symfony/debug@v2.8.52
symfony/event-dispatcher@v3.0.9
symfony/http-foundation@v2.8.52
symfony/http-kernel@v2.8.52
symfony/polyfill-ctype@v1.29.0
symfony/polyfill-mbstring@v1.29.0
symfony/polyfill-php54@v1.20.0
symfony/polyfill-php55@v1.20.0
symfony/polyfill-php56@v1.20.0
Disclaimer

This deed highlights only some of the key features and terms of the actual license. It is not a license and has no legal value. You should carefully review all of the terms and conditions of the actual license before using the licensed material.

Sandworm is not a law firm and does not provide legal services. Distributing, displaying, or linking to this deed or the license that it summarizes does not create a lawyer-client or any other relationship.

Direct Dependencies

2
All Dependencies CSV
β“˜ This is a list of fruitcake/laravel-cors 's direct dependencies. Data on all dependencies, including transitive ones, is available via CSV download.
NameVersionSizeLicenseTypeVulnerabilities
asm89/stack-cors0.2.17.56 kBMIT
prod
1
1
illuminate/supportv4.2.17-MIT
prod

Visualizations

Frequently Asked Questions

What does fruitcake/laravel-cors do?

The fruitcake/laravel-cors is a robust middleware for Laravel applications that handles Cross-Origin Resource Sharing (CORS) requests. This package provides a way to add CORS headers to the responses generated by your Laravel application. It effectively handles CORS pre-flight OPTIONS requests and customizes the routes on which CORS will be applied.

How do you use fruitcake/laravel-cors?

To use the fruitcake/laravel-cors package, you must first require it in your composer.json file and then update the dependencies:

composer require fruitcake/laravel-cors

In case there exists any conflict with older versions of barryvdh/laravel-cors or fruitcake/laravel-cors, remove the conflicting package and then try installing again:

composer remove barryvdh/laravel-cors fruitcake/laravel-cors
composer require fruitcake/laravel-cors

After the successful installation, you must add the HandleCors middleware at the top of the $middleware property of app/Http/Kernel.php class:

protected $middleware = [
  \Fruitcake\Cors\HandleCors::class,
  // ...
];

Update the configuration to define the paths on which CORS services should run:

'paths' => ['api/*'],

Further customize CORS behavior by publishing the configuration into your own config:

php artisan vendor:publish --tag="cors"

And using settings like 'allowed_headers', 'allowed_methods', etc. in config/cors.php.

Where are the fruitcake/laravel-cors docs?

The entire documentation for the fruitcake/laravel-cors package can be found directly by visiting the GitHub repository of the package - fruitcake/laravel-cors GitHub repo. It contains information about package features, installation, usage, configuration, as well as potential issues and solutions.