Download the PHP package lokhman/silex-firewall without Composer
On this page you can find all versions of the php package lokhman/silex-firewall. It is possible to download/install these versions without Composer. Possible dependencies are resolved automatically.
Please rate this library. Is it a good library?
Informations about the package silex-firewall
silex-firewall
Firewall rules service provider for Silex 2.0+ micro-framework.
This project is a part of
silex-tools
library.
Installation
You can install silex-firewall
with Composer:
composer require lokhman/silex-firewall
Documentation
Register FirewallServiceProvider
with firewall allow or/and deny settings:
use Lokhman\Silex\Provider\FirewallServiceProvider;
$app->register(new FirewallServiceProvider(), [
'firewall.options' => [
'allow' => ['127.0.0.1', '::1'], // as array
'deny' => '127.0.0.1, ::1', // as string
],
]);
// override default blocking function
$app['firewall.blocker'] = $app->protect(function (Request $request) {
return JsonResponse(['deny' => $request->getClientIp()]);
});
License
Library is available under the MIT license. The included LICENSE file describes this in detail.
All versions of silex-firewall with dependencies
PHP Build Version
Package Version
Requires
silex/silex Version
~2.0
The package lokhman/silex-firewall contains the following files
Loading the files please wait ....