diff options
| author | Fuwn <[email protected]> | 2022-04-21 03:59:25 +0000 |
|---|---|---|
| committer | Fuwn <[email protected]> | 2022-04-21 03:59:25 +0000 |
| commit | bbcd7b5f638e594a0cdd968ce5b09f6ec73e718f (patch) | |
| tree | ffb424429c834ee4ac83d1c0e5cfabee8e59933f /src | |
| parent | feat(proxy): create full html document (diff) | |
| download | september-0.1.3.tar.xz september-0.1.3.zip | |
feat: favicon support0.1.3
Diffstat (limited to 'src')
| -rw-r--r-- | src/main.rs | 9 |
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)); |