mirror of
https://github.com/invoiceninja/invoiceninja.git
synced 2025-06-03 07:44:35 -04:00
Update route throttling limits
This commit is contained in:
parent
5471eb2571
commit
6b9f211812
@ -95,7 +95,7 @@ class Kernel extends HttpKernel
|
|||||||
],
|
],
|
||||||
|
|
||||||
'api' => [
|
'api' => [
|
||||||
'throttle:300,1',
|
// 'throttle:300,1',
|
||||||
'bindings',
|
'bindings',
|
||||||
'query_logging',
|
'query_logging',
|
||||||
],
|
],
|
||||||
|
@ -34,7 +34,6 @@ class RouteServiceProvider extends ServiceProvider
|
|||||||
*/
|
*/
|
||||||
public function boot()
|
public function boot()
|
||||||
{
|
{
|
||||||
//
|
|
||||||
parent::boot();
|
parent::boot();
|
||||||
}
|
}
|
||||||
|
|
||||||
|
@ -13,17 +13,17 @@
|
|||||||
|
|
||||||
use Illuminate\Support\Facades\Route;
|
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/signup', 'AccountController@store')->name('signup.submit');
|
||||||
Route::post('api/v1/oauth_login', 'Auth\LoginController@oauthApiLogin');
|
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/login', 'Auth\LoginController@apiLogin')->name('login.submit');
|
||||||
Route::post('api/v1/reset_password', 'Auth\ForgotPasswordController@sendResetLinkEmail');
|
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::post('check_subdomain', 'SubdomainController@index')->name('check_subdomain');
|
||||||
Route::get('ping', 'PingController@index')->name('ping');
|
Route::get('ping', 'PingController@index')->name('ping');
|
||||||
Route::get('health_check', 'PingController@health')->name('health_check');
|
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')
|
Route::match(['get', 'post'], 'payment_webhook/{company_key}/{company_gateway_id}', 'PaymentWebhookController')
|
||||||
->middleware(['guest'])
|
->middleware(['throttle:1000,1','guest'])
|
||||||
->name('payment_webhook');
|
->name('payment_webhook');
|
||||||
|
|
||||||
Route::match(['get', 'post'], 'payment_notification_webhook/{company_key}/{company_gateway_id}/{client}', 'PaymentNotificationWebhookController')
|
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');
|
->name('payment_notification_webhook');
|
||||||
|
|
||||||
Route::post('api/v1/postmark_webhook', 'PostMarkController@webhook')->middleware(['throttle:10000,1']);
|
Route::post('api/v1/postmark_webhook', 'PostMarkController@webhook')->middleware('throttle:1000,1');
|
||||||
Route::get('token_hash_router', 'OneTimeTokenController@router');
|
Route::get('token_hash_router', 'OneTimeTokenController@router')->middleware('throttle:100,1');
|
||||||
Route::get('webcron', 'WebCronController@index');
|
Route::get('webcron', 'WebCronController@index')->middleware('throttle:100,1');;
|
||||||
Route::post('api/v1/get_migration_account', 'HostedMigrationController@getAccount')->middleware('guest');
|
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');
|
Route::post('api/v1/confirm_forwarding', 'HostedMigrationController@confirmForwarding')->middleware('guest')->middleware('throttle:100,1');;
|
||||||
|
|
||||||
Route::fallback('BaseController@notFound');
|
Route::fallback('BaseController@notFound');
|
||||||
|
Loading…
x
Reference in New Issue
Block a user