From dae49660b04318150c1fe79f523cdde712ff5221 Mon Sep 17 00:00:00 2001 From: Guilherme Branco Stracini Date: Fri, 17 Apr 2026 00:40:47 +0100 Subject: [PATCH] Serve favicon.ico from router --- src/Http/Router.php | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/src/Http/Router.php b/src/Http/Router.php index d22f1a3..0041fea 100644 --- a/src/Http/Router.php +++ b/src/Http/Router.php @@ -56,6 +56,10 @@ public function handle(ServerRequestInterface $request): Response return $this->serveFile(__DIR__ . '/../../public/swagger-ui.html', 'text/html'); } + if ($method === 'GET' && $path === '/favicon.ico') { + return $this->serveFile(__DIR__ . '/../../public/favicon.ico', 'image/x-icon'); + } + if ($method === 'GET' && $path === '/openapi.yaml') { return $this->serveFile(__DIR__ . '/../../public/openapi.yaml', 'application/yaml'); }