From b16b19626141bd9b4dbe6785b4cd5d2a1d30daeb Mon Sep 17 00:00:00 2001 From: doge Date: Fri, 22 Apr 2022 22:54:40 +0800 Subject: [PATCH] fix: favicon.ico 404 --- client/Cargo.toml | 2 +- server/Cargo.toml | 2 +- server/src/main.rs | 3 ++- 3 files changed, 4 insertions(+), 3 deletions(-) diff --git a/client/Cargo.toml b/client/Cargo.toml index 2c080352..eb6d6976 100644 --- a/client/Cargo.toml +++ b/client/Cargo.toml @@ -1,7 +1,7 @@ [package] edition = "2021" name = "stat_client" -version = "1.3.6" +version = "1.3.7" authors = ["doge "] categories = ["monitoring-tools"] diff --git a/server/Cargo.toml b/server/Cargo.toml index 92d11a55..d719253d 100644 --- a/server/Cargo.toml +++ b/server/Cargo.toml @@ -1,7 +1,7 @@ [package] edition = "2021" name = "stat_server" -version = "1.3.6" +version = "1.3.7" authors = ["doge "] categories = ["monitoring-tools"] diff --git a/server/src/main.rs b/server/src/main.rs index 61d90b72..037d7952 100644 --- a/server/src/main.rs +++ b/server/src/main.rs @@ -110,7 +110,8 @@ async fn main_service_func(req: Request) -> Result> { if req.method() == Method::GET && (req_path.starts_with("/js/") || req_path.starts_with("/css/") - || req_path.starts_with("/img/")) + || req_path.starts_with("/img/") + || req_path.eq("/favicon.ico")) { if let Some(data) = Asset::get(req_path) { let ct = mime_guess::from_path(req_path);