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.11.3

Adds CORS (Cross-Origin Resource Sharing) headers support in your Laravel application
Package summary
Share
2
issues
2
high severity
meta
2
1
license
30
MIT
Package created
24 Dec 2019
Version published
26 Feb 2019
Maintainers
1
Total deps
30
Direct deps
4
License
MIT

Issues

2

2 high severity issues

high
via: fruitcake/laravel-cors@v0.11.3
via: asm89/stack-cors@1.3.0 & others
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
30 Packages, Including:
asm89/stack-cors@1.3.0
carbonphp/carbon-doctrine-types@3.2.0
doctrine/inflector@1.4.4
fruitcake/laravel-cors@v0.11.3
illuminate/contracts@v5.8.36
illuminate/support@v5.8.36
nesbot/carbon@2.72.3
psr/clock@1.0.0
psr/container@1.1.2
psr/log@2.0.0
psr/simple-cache@1.0.1
symfony/debug@v4.4.44
symfony/deprecation-contracts@v3.5.0
symfony/error-handler@v4.4.44
symfony/event-dispatcher@v4.4.44
symfony/event-dispatcher-contracts@v1.10.0
symfony/http-client-contracts@v2.5.3
symfony/http-foundation@v4.4.49
symfony/http-kernel@v4.4.51
symfony/mime@v5.4.39
symfony/polyfill-ctype@v1.29.0
symfony/polyfill-intl-idn@v1.29.0
symfony/polyfill-intl-normalizer@v1.29.0
symfony/polyfill-mbstring@v1.29.0
symfony/polyfill-php72@v1.29.0
symfony/polyfill-php73@v1.29.0
symfony/polyfill-php80@v1.29.0
symfony/translation@v4.4.47
symfony/translation-contracts@v2.5.3
symfony/var-dumper@v5.4.39
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

4
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-cors1.3.05.77 kBMIT
prod
1
illuminate/supportv5.8.36-MIT
prod
symfony/http-foundationv4.4.49-MIT
prod dev
symfony/http-kernelv4.4.51191.8 kBMIT
prod dev
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.