add favicon
This commit is contained in:
parent
456057a2c0
commit
95ce25919f
2 changed files with 5 additions and 1 deletions
BIN
src/http/favicon.ico
Normal file
BIN
src/http/favicon.ico
Normal file
Binary file not shown.
|
After Width: | Height: | Size: 291 B |
|
|
@ -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;
|
||||
|
|
|
|||
Loading…
Add table
Reference in a new issue