library slim-cors
Slim Framework 3 CORS middleware
havenshen/slim-cors
Slim Framework 3 CORS middleware
- Friday, March 24, 2017
- by HavenShen
- Repository
- 1 Watchers
- 4 Stars
- 28 Installations
- PHP
- 0 Dependents
- 0 Suggesters
- 0 Forks
- 0 Open issues
- 2 Versions
- 4 % Grown
Slim Framework CORS Protection
, (*1)
This repository contains a Slim Framework CORS middleware., (*2)
Install
Via Composer, (*3)
``` bash
$ composer require havenshen/slim-cors, (*4)
Requires Slim 3.0.0 or newer.
## Usage
In most cases you want to register HavenShen\Slim\Cors.
### Register
```php
$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'));
Testing
bash
$ phpunit
, (*5)
Development progress
continues to update..., (*6)
License
The MIT License (MIT). Please see License File for more information., (*7)
dev-master
9999999-dev
Slim Framework 3 CORS middleware
Sources
Download
MIT
The Development Requires
by
Haven Shen
middleware
framework
cors
slim
v1.0.0
1.0.0.0
Slim Framework 3 CORS middleware
Sources
Download
MIT
The Development Requires
by
Haven Shen
middleware
framework
cors
slim