mirror of
https://github.com/grocy/grocy.git
synced 2025-04-29 17:45:39 +00:00
13 lines
309 B
PHP
13 lines
309 B
PHP
<?php
|
|
|
|
namespace Grocy\Middleware;
|
|
|
|
class JsonMiddleware extends BaseMiddleware
|
|
{
|
|
public function __invoke(\Slim\Http\Request $request, \Slim\Http\Response $response, callable $next)
|
|
{
|
|
$response = $next($request, $response, $next);
|
|
return $response->withHeader('Content-Type', 'application/json');
|
|
}
|
|
}
|