eden-life/superban
Composer 安装命令:
composer create-project eden-life/superban
包简介
The skeleton application for the Laravel framework.
关键字:
README 文档
README
The Superban Laravel Package provides rate limiting and banning features for API clients based on their behavior. It is designed to be easily integrated into Laravel applications.
Installation
To install the package via composer, run:
composer require edenlife/superban
Configuration
After installation, publish the configuration file:
php artisan vendor:publish --tag=superban-config
This will publish a superban.php file in your config directory.
Usage
Middleware
Apply the Superban middleware to specific routes using the following syntax:
use EdenLife\Superban\Middleware\SuperbanMiddleware; Route::middleware([SuperbanMiddleware::class . ':200,2,1440'])->group(function () { // Your routes here });
Adjust the parameters 200, 2, 1440 based on your desired rate limiting and banning configuration.
Tests
To run the package tests, use bash to run:
./vendor/bin/phpunit
Contributing
Thank you for considering contributing to the Superban package! Feel free to open issues or submit pull requests.
Security
If you discover any security-related issues, please email: anipreciousebuka@gmail.com.
统计信息
- 总下载量: 0
- 月度下载量: 0
- 日度下载量: 0
- 收藏数: 0
- 点击次数: 0
- 依赖项目数: 0
- 推荐数: 0
其他信息
- 授权协议: MIT
- 更新时间: 2023-12-19