Skip to content

Commit 558a623

Browse files
committed
Generate all favicons
1 parent f76e1c9 commit 558a623

File tree

7 files changed

+11
-3
lines changed

7 files changed

+11
-3
lines changed

CHANGELOG.md

Lines changed: 4 additions & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -11,6 +11,10 @@ and this project adheres to [Semantic Versioning](https://semver.org/spec/v2.0.0
1111

1212
- Landing page now serves HTML by default for GET requests without an explicit `Accept: application/json` header, fixing W3C validator compatibility
1313

14+
### Changed
15+
16+
- Improved favicon support with proper sizes (16x16, 32x32, 96x96) and SVG fallback
17+
1418
## [0.15.2] - 2026-01-26
1519

1620
### Added
1.22 KB
Loading
2.29 KB
Loading
9.11 KB
Loading

lib/cf/mcp/public/favicon.png

-3.68 KB
Binary file not shown.

lib/cf/mcp/server.rb

Lines changed: 3 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -120,10 +120,11 @@ def rack_app
120120
[404, {"content-type" => "application/json"}, ['{"error":"Not found"}']]
121121
when %r{^/http(/|$)}
122122
http_transport.handle_request(request)
123-
when "/logo.svg", "/logo.png", "/favicon.png", "/favicon.ico"
123+
when "/logo.svg", "/logo.png", %r{^/favicon.*\.(png|ico)$}
124124
# Serve static assets from public directory
125125
filename = path.delete_prefix("/")
126-
filename = "favicon.png" if filename == "favicon.ico" # Serve PNG for .ico requests
126+
# Map favicon.ico to 32x32 PNG (standard ICO size)
127+
filename = "favicon-32x32.png" if filename == "favicon.ico"
127128
logo_path = File.join(public_dir, filename)
128129
if File.exist?(logo_path)
129130
content_type = filename.end_with?(".svg") ? "image/svg+xml" : "image/png"

lib/cf/mcp/templates/index.erb

Lines changed: 4 additions & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -3,7 +3,10 @@
33
<head>
44
<meta charset="UTF-8">
55
<meta name="viewport" content="width=device-width, initial-scale=1.0">
6-
<link rel="icon" type="image/png" href="/favicon.png">
6+
<link rel="icon" type="image/svg+xml" href="/logo.svg">
7+
<link rel="icon" type="image/png" sizes="96x96" href="/favicon-96x96.png">
8+
<link rel="icon" type="image/png" sizes="32x32" href="/favicon-32x32.png">
9+
<link rel="icon" type="image/png" sizes="16x16" href="/favicon-16x16.png">
710
<title>CF::MCP - Cute Framework MCP Server</title>
811
<style>
912
<%= css_content %>

0 commit comments

Comments
 (0)