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.8.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
16
MIT
Package created
24 Dec 2019
Version published
24 Jan 2017
Maintainers
1
Total deps
16
Direct deps
3
License
MIT

Issues

3

2 high severity issues

high
via: fruitcake/laravel-cors@v0.8.3
via: symfony/http-kernel@v3.4.49
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
16 Packages, Including:
doctrine/inflector@1.4.4
fruitcake/laravel-cors@v0.8.3
illuminate/contracts@v5.4.36
illuminate/support@v5.4.36
paragonie/random_compat@v2.0.21
psr/log@1.1.4
symfony/debug@v4.4.44
symfony/event-dispatcher@v4.4.44
symfony/event-dispatcher-contracts@v1.10.0
symfony/http-foundation@v3.4.47
symfony/http-kernel@v3.4.49
symfony/polyfill-ctype@v1.29.0
symfony/polyfill-mbstring@v1.29.0
symfony/polyfill-php56@v1.20.0
symfony/polyfill-php70@v1.20.0
symfony/polyfill-php80@v1.29.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

3
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
illuminate/supportv5.4.36-MIT
prod
symfony/http-foundationv3.4.47-MIT
prod dev
symfony/http-kernelv3.4.49-MIT
prod dev
1
1

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.