aboutsummaryrefslogtreecommitdiff
path: root/src/main.rs
diff options
context:
space:
mode:
authorFuwn <[email protected]>2022-04-21 03:59:25 +0000
committerFuwn <[email protected]>2022-04-21 03:59:25 +0000
commitbbcd7b5f638e594a0cdd968ce5b09f6ec73e718f (patch)
treeffb424429c834ee4ac83d1c0e5cfabee8e59933f /src/main.rs
parentfeat(proxy): create full html document (diff)
downloadseptember-0.1.3.tar.xz
september-0.1.3.zip
feat: favicon support0.1.3
Diffstat (limited to 'src/main.rs')
-rw-r--r--src/main.rs9
1 files changed, 9 insertions, 0 deletions
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<HttpResponse, Error> {
));
}
+ // Try to add an external favicon from the `FAVICON_EXTERNAL` environment
+ // variable.
+ if let Ok(favicon) = var("FAVICON_EXTERNAL") {
+ html_context.push_str(&format!(
+ "<link rel=\"icon\" type=\"image/x-icon\" href=\"{}\">",
+ favicon
+ ));
+ }
+
// Add a title to HTML response
html_context.push_str(&format!("<title>{}</title>", gemini_title));