nordsoftware/lumen-cors
Larablocks Analysis
nordsoftware/lumen-cors works with Laravel 5 to 9 (latest release 3.5.0, Mar 24, 2022), all past end of life (the last on Feb 6, 2024): no more fixes, even for security.
Recommendation checks
Not advisedNot advised: marked abandoned on Packagist.
- Marked abandoned on Packagist
- Supports only Laravel 5 to 9, past end of life since Feb 6, 2024
- No release in the last 12 months (last: Mar 24, 2022)
- 15,478 downloads a month (at least 10,000)
- 94 GitHub stars (needs 100)
State
Abandoned- Packagist marks this package abandoned.
- Last stable release: Mar 24, 2022.
- No releases in the last 12 months.
- First released: May 14, 2015.
- Monthly downloads: 15,478.
- 0 open issues on GitHub.
Data from Packagist and GitHub, checked by Larablocks on Dec 3, 2026.
| Install | |
|---|---|
composer require nordsoftware/lumen-cors |
|
| Latest Version: | 3.5.0 |
| PHP: | >=7.1 |
| Laravel: | 5 – 9 |
| License: | MIT |
| Last Updated: | Feb 24, 2023 |
| Links: | GitHub · Packagist |
Lumen CORS
Cross-Origin Resource Sharing (CORS) module for the Lumen PHP framework.
Requirements
Usage
Installation
Run the following command to install the package through Composer:
composer require nordsoftware/lumen-cors
Configure
Copy the configuration template in config/cors.php to your application's config directory and modify according to your needs.
For more information see the Configuration Files section in the Lumen documentation.
Available configuration options:
- allow_origins
arrayOrigins that are allowed to perform requests, defaults to an empty array. Patterns also accepted, for example *.foo.com - allow_methods
arrayHTTP methods that are allowed, defaults to an empty array - allow_headers
arrayHTTP headers that are allowed, defaults to an empty array - allow_credentials
booleanWhether or not the response can be exposed when credentials are present, defaults to false - expose_headers
arrayHTTP headers that are allowed to be exposed to the web browser, defaults to an empty array - max_age
integerIndicates how long preflight request can be cached, defaults to 0
Bootstrapping
Add the following lines to bootstrap/app.php:
$app->register('Nord\Lumen\Cors\CorsServiceProvider');
$app->middleware([
.....
'Nord\Lumen\Cors\CorsMiddleware',
]);
The module now automatically handles all CORS requests.
Customizing behavior
While the service can be configured somewhat using config/cors.php, some more exotic things such as regular
expressions for allowed origins cannot. If you need to, you can provide this custom functionality yourself:
- Extend
CorsServiceand override e.g.isOriginAllowed() - Extend
CorsServiceProviderand overrideregisterBindings(), then register your own service class instead
Contributing
Please read the guidelines.
Running tests
Clone the project and install its dependencies by running:
composer install
Run the following command to run the test suite:
composer test
License
See LICENSE.
Related Packages
Cross-origin resource sharing (CORS) middleware & ServiceProvider for Lumen micr...
This library stores the http request api log into a database table.
This package is intended to handle guzzle client creation, its api calls & their...
Version History
| Version | Released | PHP | Laravel | License |
|---|---|---|---|---|
| 3.5.0 | >=7.1 | ^5.4 || | MIT | |
| 3.4.0 | >=7.1 | ^5.4 || | MIT | |
| 3.3.0 | >=7.1 | ^5.4 || | MIT | |
| 3.2.0 | >=7.1 | ^5.4 || | MIT | |
| 3.1.1 | >=7.1 | ^5.4 | MIT | |
| 3.1.0 | >=7.1 | MIT | ||
| 3.0.0 | >=7.1 | MIT | ||
| 2.2.1 | >=5.6 | MIT | ||
| 2.2.0 | >=5.6 | MIT | ||
| 2.1.0 | >=5.6 | MIT | ||
| 2.0.1 | >=5.6 | MIT | ||
| 2.0.0 | >=5.6 | MIT | ||
| 1.7.0 | >=5.6 | MIT | ||
| 1.6.0 | >=5.4 | MIT | ||
| 1.5.2 | >=5.4 | MIT | ||
| 1.5.1 | >=5.4 | MIT | ||
| 1.5.0 | >=5.4 | MIT | ||
| 1.4.0 | >=5.4 | MIT | ||
| 1.3.4 | >=5.4 | MIT | ||
| 1.3.3 | >=5.4 | MIT | ||
| 1.3.2 | >=5.4 | MIT | ||
| 1.3.1 | >=5.4 | MIT | ||
| 1.3.0 | >=5.4 | MIT | ||
| 1.2.6 | >=5.4 | MIT | ||
| 1.2.5 | >=5.4 | MIT | ||
| 1.2.4 | >=5.4 | MIT | ||
| 1.2.3 | >=5.4 | MIT | ||
| 1.2.2 | >=5.4 | MIT | ||
| 1.2.1 | >=5.4 | MIT | ||
| 1.2.0 | >=5.4 | MIT |
Showing the latest 30 of 32. See every release on Packagist
