2017 © Pedro Peláez
 

library silex-firewall

Silex 2.0+ service provider for firewall rules

image

lokhman/silex-firewall

Silex 2.0+ service provider for firewall rules

  • Tuesday, May 16, 2017
  • by lokhman
  • Repository
  • 2 Watchers
  • 1 Stars
  • 211 Installations
  • PHP
  • 1 Dependents
  • 0 Suggesters
  • 0 Forks
  • 0 Open issues
  • 2 Versions
  • 3 % Grown

The README.md

silex-firewall

StyleCI, (*1)

Firewall rules service provider for Silex 2.0+ micro-framework., (*2)

This project is a part of silex-tools library., (*3)

Installation

You can install silex-firewall with Composer:, (*4)

composer require lokhman/silex-firewall

Documentation

Register FirewallServiceProvider with firewall allow or/and deny settings:, (*5)

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., (*6)

The Versions

16/05 2017

dev-master

9999999-dev

Silex 2.0+ service provider for firewall rules

  Sources   Download

MIT

The Requires

 

by Alexander Lokhman

silex firewall tools

16/05 2017

2.0.0

2.0.0.0

Silex 2.0+ service provider for firewall rules

  Sources   Download

MIT

The Requires

 

by Alexander Lokhman

silex firewall tools