ldc-arcadia-api/bootstrap/middlewares.php
Jérémy Munsch a93fde3a3c
feat(api): implement rate limiting and error handling
- Added rate limiting for web and API requests.
- Introduced custom error handling for "Too Many Requests" response.
- Created view for "Too Many Requests" error documentation.
2026-08-12 17:25:45 +02:00

18 lines
302 B
PHP

<?php
declare(strict_types=1);
use Illuminate\Foundation\Configuration\Middleware;
return function (Middleware $middleware): void {
$middleware->web(append: [
'throttle:web',
]);
$middleware->api(append: [
'throttle:api.v1',
]);
$middleware->alias([
]);
};