. */ declare(strict_types=1); namespace Fisharebest\Webtrees\Http\RequestHandlers; use Fisharebest\Webtrees\View; use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Server\RequestHandlerInterface; use function response; /** * Respond to /apple-touch-icon.png. */ class WebmanifestJson implements RequestHandlerInterface { /** * @param ServerRequestInterface $request * * @return ResponseInterface */ public function handle(ServerRequestInterface $request): ResponseInterface { $content = View::make('webmanifest-json'); return response($content) ->withHeader('content-type', 'application/json') ->withHeader('cache-control', 'public,max-age=31536000'); } }