Name: cors
Owner: Middlewares
Description: PSR-15 middleware to implement Cross-Origin Resource Sharing (CORS)
Created: 2016-10-09 09:59:04.0
Updated: 2018-03-21 07:31:59.0
Pushed: 2018-01-25 22:40:16.0
Homepage: null
Size: 23
Language: PHP
GitHub Committers
User | Most Recent Commit | # Commits |
---|
Other Committers
User | Most Recent Commit | # Commits |
---|
Middleware to implement Cross-Origin Resource Sharing (CORS) using neomerx/cors-psr7.
This package is installable and autoloadable via Composer as middlewares/cors.
oser require middlewares/cors
Neomerx\Cors\Strategies\Settings;
Neomerx\Cors\Analyzer;
tings = new Settings();
tings->setServerOrigin([
'scheme' => 'http',
'host' => 'example.com',
'port' => '123',
lyzer = Analyzer::instance($settings);
patcher = new Dispatcher([
new Middlewares\Cors($analyzer)
ponse = $dispatcher->dispatch(new ServerRequest());
__construct(Neomerx\Cors\Contracts\AnalyzerInterface $analyzer)
The CORS analyzer used. See neomerx/cors-psr7 for more info.
Please see CHANGELOG for more information about recent changes and CONTRIBUTING for contributing details.
The MIT License (MIT). Please see LICENSE for more information.