. */ declare(strict_types=1); namespace Fisharebest\Webtrees\Http\RequestHandlers; use Fisharebest\Webtrees\Auth; use Fisharebest\Webtrees\FlashMessages; use Fisharebest\Webtrees\I18N; use Fisharebest\Webtrees\Log; use Fisharebest\Webtrees\User; use Psr\Http\Message\ResponseInterface; use Psr\Http\Message\ServerRequestInterface; use Psr\Http\Server\RequestHandlerInterface; use function file_get_contents; use function redirect; use function response; use function route; /** * Respond to /favicon.ico. */ class FaviconIco implements RequestHandlerInterface { /** * @param ServerRequestInterface $request * * @return ResponseInterface */ public function handle(ServerRequestInterface $request): ResponseInterface { $content = file_get_contents(__DIR__ . '/../../../favicon.ico'); return response($content) ->withHeader('Content-Type', 'image/x-icon') ->withHeader('Cache-Control', 'max-age=2592000'); } }