fix(api): correct condition for JSON request handling

Ensure proper handling of requests that expect JSON responses.
This commit is contained in:
Jérémy Munsch 2026-08-12 17:30:36 +02:00
parent fd284db1c2
commit 33f3aaf37f
Signed by: forge-joniko
GPG key ID: D7EFE2F5CB6CC0E4

View file

@ -18,7 +18,7 @@ final readonly class ApiExceptionDispatcher
public function render(Throwable $e, Request $request): ?JsonResponse
{
if (! $request->is('api/*') && ! $request->wantsJson()) {
if (! $request->is('api/*', 'api') && ! $request->wantsJson()) {
return null;
}