I had this problem once dealing with webhooks with a custom ERP integration.
You could create your own middleware group for the webhooks and either exclude the throttle middleware within your app/kernel.php, or increase the number of requestes allowed:
You might just be using an umbrella 'api' middleware group:
'api' => [
'throttle:240,1' // allow 240 requests per minute to api group
]
disable all throttling for shopify:
'shopify' => [
// 'throttle:60,1'
]
You could also add throttling on specific route, or a group of routes:
->middleware('throttle:120,1');
Route::group(['prefix' => 'webhooks', 'middleware' => 'throttle:120,1'], function () {
Route::get() ....
Route::get() ....
});
But in the case of applying it to a single route you'd want to make sure the route is not part of a middleware group that has the throttle middleware applied or it would still be in effect for each request. In other words, it won't override it.
As for the cons of completely disabling throttling, your application simply won't rate limit incoming requests.