fix(api): correct JSON rendering condition for API requests

Updated the condition to ensure JSON responses are rendered for both 'api/*' and 'api' requests.
This commit is contained in:
Jérémy Munsch 2026-08-12 17:30:22 +02:00
parent 04243860ce
commit fd284db1c2
Signed by: forge-joniko
GPG key ID: D7EFE2F5CB6CC0E4

View file

@ -30,6 +30,6 @@ return function (Exceptions $exceptions): void {
});
$exceptions->shouldRenderJsonWhen(
fn (Request $request) => $request->is('api/*'),
fn (Request $request) => $request->is('api/*', 'api'),
);
};