From bbcd7b5f638e594a0cdd968ce5b09f6ec73e718f Mon Sep 17 00:00:00 2001 From: Fuwn Date: Thu, 21 Apr 2022 03:59:25 +0000 Subject: feat: favicon support --- src/main.rs | 9 +++++++++ 1 file changed, 9 insertions(+) (limited to 'src') diff --git a/src/main.rs b/src/main.rs index ade91ed..327117d 100644 --- a/src/main.rs +++ b/src/main.rs @@ -327,6 +327,15 @@ async fn default(req: actix_web::HttpRequest) -> Result { )); } + // Try to add an external favicon from the `FAVICON_EXTERNAL` environment + // variable. + if let Ok(favicon) = var("FAVICON_EXTERNAL") { + html_context.push_str(&format!( + "", + favicon + )); + } + // Add a title to HTML response html_context.push_str(&format!("{}", gemini_title)); -- cgit v1.2.3