I need to configure different speed limits for different paths. Game example:
For the / users path, I want to have a speed limit of 60 requests per minute, and for the / stats path I want the speed limit to be only 5 requests per minute.
I tried with a follow up approach
Route::group(['middleware' => ['auth', 'throttle:60']], function(){ Route::get('users', ' User@list '); }); Route::group(['middleware' => ['auth', 'throttle:5']], function(){ Route::get('stats', ' User@stats '); });
Somehow the last bet limit is applied. However, when performing requests to users' paths, the X-Rate-Limit-Limit header is set to 60, but when it reaches the 6th request, it generates the error "Too many requests."
source share