From df5a71716cf0ba80a4a3577e5df4291c83c21306 Mon Sep 17 00:00:00 2001 From: shenjack <3695888@qq.com> Date: Sat, 24 Aug 2024 23:15:10 +0800 Subject: [PATCH] =?UTF-8?q?=E5=8A=A0=E4=B8=AA=20favicon?= MIME-Version: 1.0 Content-Type: text/plain; charset=UTF-8 Content-Transfer-Encoding: 8bit --- sr_download/src/favicon.ico | Bin 0 -> 15406 bytes sr_download/src/serve.rs | 9 +++++++++ 2 files changed, 9 insertions(+) create mode 100644 sr_download/src/favicon.ico diff --git a/sr_download/src/favicon.ico b/sr_download/src/favicon.ico new file mode 100644 index 0000000000000000000000000000000000000000..579dd9fab9e1f0e9381ad6b97df8ad4ab8d8c1dd GIT binary patch literal 15406 zcmeHud0ftE`*ymw_FbDIlql_J6B4Nur6iK`%#0bs zjAe){&+OdyeZ0r@ZOk*z`}zIe&*y#reShp`8H)vcQY|ywQszYP+@Hvfb zk}fs22`_$;)={pV>!ZZh9!k{qRiLD&9+q{JV`sQNZVolX)$z7CJ=h%E;%u-qxfjC5 zR>5-OD;Q_IML^_C?OboUcBYpc`TS1ZU@KJjwMDW^ENWv-@a^<=I2UP%b^R=`H6tDo z6Y9}+{jV@NsDb17n-~}3rY-BK)E4(K!AgJb*+&n#K|^6^cmkun2B4~&3X6POqM@xl zsz;<^%GNqey89#icD%#jlq{?dHqh=2RciP3QJ^NmfP1Tu?v;s_EnmRZcm_5{xZ#I2 zY4|zP4NduDaiuI5*|o#hlB~)qM#)JucNto~eoJ8w~dxiEUweSQ?;*>75nYRY59k z^`JKJ_k9X$>zA-FeTecot1xEJWl0V_)lv*{n*l@B6W;49gtje1ZG=8H^w7s_Pq}tS zKV$95i5)RBFauq@pCiLF0YUZ|XlJ~X@;s&YqYewh27!y*xy%)6|~biUJ5Mo zk)yz0rOohAX!mA?hJA_d^H)1AjcttOB%B#SJ zKsj={>LasWzZDFudySSS|JHcI{9oJEzT|mFu8chBAE435cz~7fAOM-GfrH+xI}#V@BWK&(EVauM|s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4I`iTNgx=c|cv z@V9DG{l1>_Lt?g3_+zGr5|jA(X}kx{eXs}7WgVvC+%b78o_k8(@bm@$IEr zGo5>-(&mS>Q($m=C1Tqu5#bln*^|ZoYMLw@N7m9o+dQLIR zD&{t3bJjYY7{M49F5YQ|ml5S>tQNl;Am_T4_FT&ER5I^X(l@vE5dD*}^!usVlwa`V zV>;+!6u&>3kK;S)iaJ>0Y?lNYA)i?CD#m}Y#P20U{+-P{AZDb-u%1cjpu|WI6AbHY zhEO}1I<&pvhshD%nsh%?%~UUyCd*5ynaA1Jh2C-v^S6dvq=x>c$?VK|I5#eDGY#jS zG>L7SSF(#j!{0<|I6tSE?k?kZd~bXQUCy=XYKHK; z2~N#R{2k6mX{ZZLrl-EN|13|LhO<+YL$0BHX{NX-`1j?S;hc%1{cB>{C^S9o6&iQ5 T79Ths^gsXoj|TpqHSoUx7398> literal 0 HcmV?d00001 diff --git a/sr_download/src/serve.rs b/sr_download/src/serve.rs index e8d0bbe..813e71a 100644 --- a/sr_download/src/serve.rs +++ b/sr_download/src/serve.rs @@ -5,6 +5,7 @@ use axum::{ routing::get, Json, Router, }; +use reqwest::header; use sea_orm::{ActiveEnum, DatabaseConnection}; use serde::{Deserialize, Serialize}; @@ -233,6 +234,12 @@ async fn dashboard_page(State(db): State) -> Html { Html(page_content) } +const FAVICON_FILE: &[u8] = include_bytes!("favicon.ico"); + +async fn favicon() -> impl IntoResponse { + ([(header::CONTENT_TYPE, "image/x-icon")], FAVICON_FILE) +} + pub async fn web_main() -> anyhow::Result<()> { let conf = crate::config::ConfigFile::try_read()?; @@ -254,6 +261,8 @@ pub async fn web_main() -> anyhow::Result<()> { .route("/download/:id", get(get_data_by_id).post(get_data_by_id)) // info 页面 .route("/dashboard", get(dashboard_page).post(dashboard_page)) + // favicon + .route("/favicon.ico", get(favicon).post(favicon)) // 其他所有路径, 直接跳转到 info 页面 .route("/*path", get(jump_to_dashboard).post(jump_to_dashboard)) // 包括根路径