ldc-arcadia-api/bootstrap/middlewares.php

24 lines
500 B
PHP
Raw Normal View History

<?php
declare(strict_types=1);
use Illuminate\Foundation\Configuration\Middleware;
use Presentation\Api\V1\Http\Middlewares\TransformApiV1Response;
return function (Middleware $middleware): void {
$middleware->web(append: [
'throttle:web',
]);
$middleware->api(append: []);
$middleware->group('api.v1', [
'throttle:api.v1',
TransformApiV1Response::class,
]);
$middleware->preventRequestsDuringMaintenance(except: [
'errors/*',
]);
};