[10.x] Minor skeleton slimming (#6159)
* remove rate limiter from route provider by default * remove policy place holder * remove broadcast skeleton in favor of new provider in core * use default provider collection * Remove unnecessary properties from exception handler. * add back broadcast provider * update comment * add rate limiting * Apply fixes from StyleCI * fix formatting --------- Co-authored-by: StyleCI Bot <bot@styleci.io>
This commit is contained in:
@@ -24,7 +24,9 @@ class RouteServiceProvider extends ServiceProvider
|
||||
*/
|
||||
public function boot(): void
|
||||
{
|
||||
$this->configureRateLimiting();
|
||||
RateLimiter::for('api', function (Request $request) {
|
||||
return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip());
|
||||
});
|
||||
|
||||
$this->routes(function () {
|
||||
Route::middleware('api')
|
||||
@@ -35,14 +37,4 @@ class RouteServiceProvider extends ServiceProvider
|
||||
->group(base_path('routes/web.php'));
|
||||
});
|
||||
}
|
||||
|
||||
/**
|
||||
* Configure the rate limiters for the application.
|
||||
*/
|
||||
protected function configureRateLimiting(): void
|
||||
{
|
||||
RateLimiter::for('api', function (Request $request) {
|
||||
return Limit::perMinute(60)->by($request->user()?->id ?: $request->ip());
|
||||
});
|
||||
}
|
||||
}
|
||||
|
||||
Reference in New Issue
Block a user