mirror of
https://github.com/Bubka/2FAuth.git
synced 2024-12-11 17:50:39 +01:00
24 lines
404 B
PHP
24 lines
404 B
PHP
<?php
|
|
|
|
namespace App\Http\Middleware;
|
|
|
|
use Closure;
|
|
|
|
class ForceJsonResponse
|
|
{
|
|
/**
|
|
* Handle an incoming request.
|
|
*
|
|
* @param \Illuminate\Http\Request $request
|
|
* @return mixed
|
|
*
|
|
* @codeCoverageIgnore
|
|
*/
|
|
public function handle($request, Closure $next)
|
|
{
|
|
$request->headers->set('Accept', 'application/json');
|
|
|
|
return $next($request);
|
|
}
|
|
}
|