floriansemm / expose-bundle
v0.1.1
2017-08-11 13:41 UTC
Requires
- enygma/expose: ^3.0
- symfony/symfony: ^2.8|^3.0
This package is auto-updated.
Last update: 2024-11-08 00:14:28 UTC
README
Integrates the expose project into symfony. It allows you to register handlers to respond to reports for the current request. (to block users/ips, send notifications, etc.)
The bundle add a "suspend request" feature. If is the impact for the current request greater than the configured threshold (default is 7), then an IntrusionException
will be thrown. All registered handlers will be executed before this check throws the exception.
Installation
composer require floriansemm/expose-bundle
Register the bundle:
<?php // app/AppKernel.php public function registerBundles() { $bundles = array( // ... new FS\ExposeBundle\FSExposeBundle(), ); }
Add the configuration to your config.yml
fs_expose: ~
Configuration
If you want to allow all requests no matter what impact occurs, set the impact
option to 0:
fs_expose: request_suspension: impact: 0
Add a intrusion-handler
- create a service which implements
IntrusionHandlerInterface
- tag the service with
expose.intrusion_handler