add favicon

This commit is contained in:
Emil Lerch 2026-01-06 09:10:00 -08:00
parent 456057a2c0
commit 95ce25919f
Signed by: lobo
GPG key ID: A7B62D657EF764F8
2 changed files with 5 additions and 1 deletions

BIN
src/http/favicon.ico Normal file

Binary file not shown.

After

Width:  |  Height:  |  Size: 291 B

View file

@ -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;