2FAuth/app/Http/Middleware/ForceJsonResponse.php
2023-03-26 17:13:32 +02:00

22 lines
369 B
PHP

<?php
namespace App\Http\Middleware;
use Closure;
class ForceJsonResponse
{
/**
* Handle an incoming request.
*
* @param \Illuminate\Http\Request $request
* @return mixed
*/
public function handle($request, Closure $next)
{
$request->headers->set('Accept', 'application/json');
return $next($request);
}
}