mirror of
https://github.com/snipe/snipe-it.git
synced 2024-12-24 21:24:13 -08:00
Fixes broken API throttling
Signed-off-by: snipe <snipe@snipe.net>
This commit is contained in:
parent
a8028e7dd0
commit
50f55b4308
|
@ -153,4 +153,4 @@ IMPORT_TIME_LIMIT=600
|
|||
IMPORT_MEMORY_LIMIT=500M
|
||||
REPORT_TIME_LIMIT=12000
|
||||
REQUIRE_SAML=false
|
||||
|
||||
API_THROTTLE_PER_MINUTE=120
|
|
@ -45,7 +45,6 @@ class Kernel extends HttpKernel
|
|||
],
|
||||
|
||||
'api' => [
|
||||
'throttle:120,1',
|
||||
'auth:api',
|
||||
],
|
||||
];
|
||||
|
|
|
@ -425,4 +425,15 @@ return [
|
|||
|
||||
],
|
||||
|
||||
/*
|
||||
|--------------------------------------------------------------------------
|
||||
| API Throttling
|
||||
|--------------------------------------------------------------------------
|
||||
|
|
||||
| This value determines the number of API requests permitted per minute
|
||||
|
|
||||
*/
|
||||
|
||||
'api_throttle_per_minute' => env('API_THROTTLE_PER_MINUTE', 120),
|
||||
|
||||
];
|
||||
|
|
|
@ -14,7 +14,7 @@ use Illuminate\Http\Request;
|
|||
*/
|
||||
|
||||
|
||||
Route::group(['prefix' => 'v1','namespace' => 'Api', 'middleware' => 'auth:api'], function () {
|
||||
Route::group(['prefix' => 'v1','namespace' => 'Api', 'middleware' => ['api', 'throttle:'.config('app.api_throttle_per_minute').',1']], function () {
|
||||
|
||||
|
||||
Route::get('/', function() {
|
||||
|
|
Loading…
Reference in a new issue