I have three groups within an "auth:api" middleware block:
Route::middleware('auth:api')->group(function () {
Route::middleware('throttle:5,1,one')->group(function () {
Route::get('one', function () {
return 'one';
});
});
Route::middleware('throttle:10,1,two')->group(function () {
Route::get('two', function () {
return 'two';
});
});
Route::middleware('throttle:15,1,three')->group(function () {
Route::get('three', function () {
return 'three';
});
});
});
My intention is to have each of the three GET routes to have their own independent limits.
When I issue five quick GET requests to the "one" route, it gives a 429 error as expected. However, immediately issuing a GET request to the "two" or "three" routes, they also give a 429 promptly.
Note that I have disabled the default throttle setting in Kernel.php:
'api' => [
// 'throttle:60,1',
'bindings',
],
Hopefully I'm missing something obvious. Is this normal behaviour? How can I make these all have their own limits? I've scoured all sorts of doc pages, and I can't seem to figure this out.