初始化本地仓库
This commit is contained in:
@@ -0,0 +1,14 @@
|
||||
<?php
|
||||
return [
|
||||
'enable' => true,
|
||||
'driver' => 'auto', // auto, apcu, memory, redis
|
||||
'stores' => [
|
||||
'redis' => [
|
||||
'connection' => 'default',
|
||||
]
|
||||
],
|
||||
// 这些ip的请求不做频率限制
|
||||
'ip_whitelist' => [
|
||||
'127.0.0.1',
|
||||
],
|
||||
];
|
||||
@@ -0,0 +1,17 @@
|
||||
<?php
|
||||
/**
|
||||
* This file is part of webman.
|
||||
*
|
||||
* Licensed under The MIT License
|
||||
* For full copyright and license information, please see the MIT-LICENSE.txt
|
||||
* Redistributions of files must retain the above copyright notice.
|
||||
*
|
||||
* @author walkor<walkor@workerman.net>
|
||||
* @copyright walkor<walkor@workerman.net>
|
||||
* @link http://www.workerman.net/
|
||||
* @license http://www.opensource.org/licenses/mit-license.php MIT License
|
||||
*/
|
||||
|
||||
return [
|
||||
Webman\RateLimiter\Bootstrap::class
|
||||
];
|
||||
@@ -0,0 +1,8 @@
|
||||
<?php
|
||||
use Webman\RateLimiter\Limiter;
|
||||
|
||||
return [
|
||||
'@' => [
|
||||
Limiter::class
|
||||
],
|
||||
];
|
||||
Reference in New Issue
Block a user