diff --git a/src/http/favicon.ico b/src/http/favicon.ico new file mode 100644 index 0000000..c1d712d Binary files /dev/null and b/src/http/favicon.ico differ diff --git a/src/http/handler.zig b/src/http/handler.zig index 7f68725..3d51b26 100644 --- a/src/http/handler.zig +++ b/src/http/handler.zig @@ -48,7 +48,11 @@ pub fn handleWeather( break :blk loc; } else break :blk client_ip; // no location, just use client ip instead }; - + if (std.mem.eql(u8, "favicon.ico", location)) { + res.header("Content-Type", "image/x-icon"); + res.body = @embedFile("favicon.ico"); + return; + } log.debug("location = {s}, client_ip = {s}", .{ location, client_ip }); if (location.len == 0) { res.content_type = .TEXT;