This repository contains a Slim Framework CORS middleware.
Via Composer
$ composer require havenshen/slim-cors
Requires Slim 3.0.0 or newer.
In most cases you want to register HavenShen\Slim\Cors.
$app = new \Slim\App([
'settings' => [
'dispayErrorDetails' => true,
]
]);
$container = $app->getContainer();
$container['cors'] = function ($c) {
return new \HavenShen\Slim\Cors\Guard;
};
$app->add($container->get('cors'));
$ phpunit
continues to update...
The MIT License (MIT). Please see License File for more information.