2FAuth/app/Http/Middleware/ForceJsonResponse.php

24 lines
403 B
PHP
Raw Normal View History

2021-09-06 18:07:14 +02:00
<?php
namespace App\Http\Middleware;
use Closure;
class ForceJsonResponse
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @return mixed
2024-09-26 23:50:01 +02:00
*
2024-07-03 11:16:08 +02:00
* @codeCoverageIgnore
2021-09-06 18:07:14 +02:00
*/
public function handle($request, Closure $next)
{
$request->headers->set('Accept', 'application/json');
2022-11-22 15:15:52 +01:00
2021-09-06 18:07:14 +02:00
return $next($request);
}
2022-11-22 15:15:52 +01:00
}