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 9, 2024 via composer

fruitcake/laravel-cors v3.0.0

Adds CORS (Cross-Origin Resource Sharing) headers support in your Laravel application
Package summary
Share
1
issue
1
high severity
meta
1
1
license
21
MIT
Package created
24 Dec 2019
Version published
23 Feb 2022
Maintainers
1
Total deps
21
Direct deps
3
License
MIT

Issues

1

1 high severity issue

high
via: fruitcake/laravel-cors@v3.0.0
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
21 Packages, Including:
carbonphp/carbon-doctrine-types@3.2.0
doctrine/inflector@2.0.10
fruitcake/laravel-cors@v3.0.0
fruitcake/php-cors@v1.3.0
illuminate/collections@v9.52.16
illuminate/conditionable@v9.52.16
illuminate/contracts@v9.52.16
illuminate/macroable@v9.52.16
illuminate/support@v9.52.16
nesbot/carbon@2.72.3
psr/clock@1.0.0
psr/container@2.0.2
psr/simple-cache@3.0.0
symfony/deprecation-contracts@v3.5.0
symfony/http-foundation@v7.0.7
symfony/polyfill-mbstring@v1.29.0
symfony/polyfill-php80@v1.29.0
symfony/polyfill-php83@v1.29.0
symfony/translation@v6.4.7
symfony/translation-contracts@v3.5.0
voku/portable-ascii@2.0.1
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
fruitcake/php-corsv1.3.06.44 kBMIT
prod
illuminate/contractsv9.52.1667.37 kBMIT
prod
illuminate/supportv9.52.16102.2 kBMIT
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.