1
0
mirror of https://github.com/invoiceninja/invoiceninja.git synced 2024-11-10 05:02:36 +01:00

Update route throttling limits

This commit is contained in:
David Bomba 2022-01-21 14:58:58 +11:00
parent 5471eb2571
commit 6b9f211812
3 changed files with 11 additions and 12 deletions

View File

@ -95,7 +95,7 @@ class Kernel extends HttpKernel
],
'api' => [
'throttle:300,1',
// 'throttle:300,1',
'bindings',
'query_logging',
],

View File

@ -34,7 +34,6 @@ class RouteServiceProvider extends ServiceProvider
*/
public function boot()
{
//
parent::boot();
}

View File

@ -13,17 +13,17 @@
use Illuminate\Support\Facades\Route;
Route::group(['middleware' => ['api_secret_check']], function () {
Route::group(['middleware' => ['throttle:10,1', 'api_secret_check']], function () {
Route::post('api/v1/signup', 'AccountController@store')->name('signup.submit');
Route::post('api/v1/oauth_login', 'Auth\LoginController@oauthApiLogin');
});
Route::group(['middleware' => ['api_secret_check','email_db']], function () {
Route::group(['middleware' => ['throttle:10,1','api_secret_check','email_db']], function () {
Route::post('api/v1/login', 'Auth\LoginController@apiLogin')->name('login.submit');
Route::post('api/v1/reset_password', 'Auth\ForgotPasswordController@sendResetLinkEmail');
});
Route::group(['middleware' => ['api_db', 'token_auth', 'locale'], 'prefix' => 'api/v1', 'as' => 'api.'], function () {
Route::group(['middleware' => ['throttle:300,1', 'api_db', 'token_auth', 'locale'], 'prefix' => 'api/v1', 'as' => 'api.'], function () {
Route::post('check_subdomain', 'SubdomainController@index')->name('check_subdomain');
Route::get('ping', 'PingController@index')->name('ping');
Route::get('health_check', 'PingController@health')->name('health_check');
@ -216,17 +216,17 @@ Route::group(['middleware' => ['api_db', 'token_auth', 'locale'], 'prefix' => 'a
});
Route::match(['get', 'post'], 'payment_webhook/{company_key}/{company_gateway_id}', 'PaymentWebhookController')
->middleware(['guest'])
->middleware(['throttle:1000,1','guest'])
->name('payment_webhook');
Route::match(['get', 'post'], 'payment_notification_webhook/{company_key}/{company_gateway_id}/{client}', 'PaymentNotificationWebhookController')
->middleware(['guest'])
->middleware(['throttle:1000,1', 'guest'])
->name('payment_notification_webhook');
Route::post('api/v1/postmark_webhook', 'PostMarkController@webhook')->middleware(['throttle:10000,1']);
Route::get('token_hash_router', 'OneTimeTokenController@router');
Route::get('webcron', 'WebCronController@index');
Route::post('api/v1/get_migration_account', 'HostedMigrationController@getAccount')->middleware('guest');
Route::post('api/v1/confirm_forwarding', 'HostedMigrationController@confirmForwarding')->middleware('guest');
Route::post('api/v1/postmark_webhook', 'PostMarkController@webhook')->middleware('throttle:1000,1');
Route::get('token_hash_router', 'OneTimeTokenController@router')->middleware('throttle:100,1');
Route::get('webcron', 'WebCronController@index')->middleware('throttle:100,1');;
Route::post('api/v1/get_migration_account', 'HostedMigrationController@getAccount')->middleware('guest')->middleware('throttle:100,1');;
Route::post('api/v1/confirm_forwarding', 'HostedMigrationController@confirmForwarding')->middleware('guest')->middleware('throttle:100,1');;
Route::fallback('BaseController@notFound');