在线时间:8:00-16:00
迪恩网络APP
随时随地掌握行业动态
扫描二维码
关注迪恩网络微信公众号
开源软件名称(OpenSource Name):akaunting/laravel-firewall开源软件地址(OpenSource Url):https://github.com/akaunting/laravel-firewall开源编程语言(OpenSource Language):PHP 100.0%开源软件介绍(OpenSource Introduction):Web Application Firewall (WAF) package for LaravelThis package intends to protect your Laravel app from different type of attacks such as XSS, SQLi, RFI, LFI, User Agent, and a lot more. It will also block repeated attacks and send notification via email and/or slack when attack is detected. Furthermore, it will log failed logins and block the IP after a number of attempts. Note: Some middleware classes (i.e. Xss) are empty as the Getting Started1. InstallRun the following command: composer require akaunting/laravel-firewall 2. Register (for Laravel < 5.5)Register the service provider in Akaunting\Firewall\Provider::class, 3. PublishPublish configuration, language, and migrations php artisan vendor:publish --tag=firewall 4. DatabaseCreate db tables php artisan migrate 5. ConfigureYou can change the firewall settings of your app from UsageMiddlewares are already defined so should just add them to routes. The Route::group(['middleware' => 'firewall.all'], function () {
Route::get('/', 'HomeController@index');
}); You can apply each middleware per route. For example, you can allow only whitelisted IPs to access admin: Route::group(['middleware' => 'firewall.whitelist'], function () {
Route::get('/admin', 'AdminController@index');
}); Or you can get notified when anyone NOT in Route::group(['middleware' => 'firewall.url'], function () {
Route::get('/admin', 'AdminController@index');
}); Available middlewares applicable to routes: firewall.all
firewall.agent
firewall.bot
firewall.geo
firewall.ip
firewall.lfi
firewall.php
firewall.referrer
firewall.rfi
firewall.session
firewall.sqli
firewall.swear
firewall.url
firewall.whitelist
firewall.xss You may also define NotificationsFirewall will send a notification as soon as an attack has been detected. Emails entered in ChangelogPlease see Releases for more information what has changed recently. ContributingPull requests are more than welcome. You must follow the PSR coding standards. SecurityIf you discover any security related issues, please email [email protected] instead of using the issue tracker. CreditsLicenseThe MIT License (MIT). Please see LICENSE for more information. |
2023-10-27
2022-08-15
2022-08-17
2022-09-23
2022-08-13
请发表评论