diff --git a/src/channels/web/server.rs b/src/channels/web/server.rs index d8f73671..fb4b698b 100644 --- a/src/channels/web/server.rs +++ b/src/channels/web/server.rs @@ -290,7 +290,8 @@ pub async fn start_server( let statics = Router::new() .route("/", get(index_handler)) .route("/style.css", get(css_handler)) - .route("/app.js", get(js_handler)); + .route("/app.js", get(js_handler)) + .route("/favicon.ico", get(favicon_handler)); // Project file serving (behind auth to prevent unauthorized file access). let projects = Router::new() @@ -392,6 +393,16 @@ async fn js_handler() -> impl IntoResponse { ) } +async fn favicon_handler() -> impl IntoResponse { + ( + [ + (header::CONTENT_TYPE, "image/x-icon"), + (header::CACHE_CONTROL, "public, max-age=86400"), + ], + include_bytes!("static/favicon.ico").as_slice(), + ) +} + // --- Health --- async fn health_handler() -> Json { diff --git a/src/channels/web/static/favicon.ico b/src/channels/web/static/favicon.ico new file mode 100644 index 00000000..2f144abd Binary files /dev/null and b/src/channels/web/static/favicon.ico differ diff --git a/src/channels/web/static/index.html b/src/channels/web/static/index.html index 0c13974d..4a2ecd16 100644 --- a/src/channels/web/static/index.html +++ b/src/channels/web/static/index.html @@ -4,6 +4,7 @@ IronClaw +