From 761d4e64f7adf032d1303350a142f2202b51bc24 Mon Sep 17 00:00:00 2001 From: Dean Blackborough Date: Tue, 26 Jan 2021 23:46:35 +0000 Subject: [PATCH] Rate limiting - Switched to new rate limiting --- app/Http/Kernel.php | 2 +- app/Providers/RouteServiceProvider.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/app/Http/Kernel.php b/app/Http/Kernel.php index ff44ce8a..8a85b5f7 100644 --- a/app/Http/Kernel.php +++ b/app/Http/Kernel.php @@ -37,7 +37,7 @@ class Kernel extends HttpKernel ], 'api' => [ - 'throttle:300,1', + 'throttle:api', 'bindings' ], ]; diff --git a/app/Providers/RouteServiceProvider.php b/app/Providers/RouteServiceProvider.php index 3787ee33..faf7a8b4 100644 --- a/app/Providers/RouteServiceProvider.php +++ b/app/Providers/RouteServiceProvider.php @@ -56,7 +56,7 @@ public function boot() protected function configureRateLimiting() { RateLimiter::for('api', function (Request $request) { - return Limit::perMinute(60)->by(optional($request->user())->id ?: $request->ip()); + return Limit::perMinute(300)->by(optional($request->user())->id ?: $request->ip()); }); } }