OneBot: Leantime 改造版源码(BOM/Univer 表格/AI 接管/品牌替换等)
This commit is contained in:
21
app/Core/Middleware/RateLimiter.php
Normal file
21
app/Core/Middleware/RateLimiter.php
Normal file
@@ -0,0 +1,21 @@
|
||||
<?php
|
||||
|
||||
namespace Leantime\Core\Middleware;
|
||||
|
||||
use Illuminate\Support\Facades\Cache;
|
||||
use Illuminate\Support\ServiceProvider;
|
||||
|
||||
class RateLimiter extends ServiceProvider
|
||||
{
|
||||
/**
|
||||
* Register any application services.
|
||||
*
|
||||
* @return void
|
||||
*/
|
||||
public function register()
|
||||
{
|
||||
$this->app->singleton(\Illuminate\Cache\RateLimiter::class, function ($app) {
|
||||
return new \Illuminate\Cache\RateLimiter(Cache::store('installation'));
|
||||
});
|
||||
}
|
||||
}
|
||||
Reference in New Issue
Block a user