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 | 3c20c2e07fda5365a19fa300ece24ffd75951f5d (patch) | |
| tree | 6cce28e01ee3aeb0be84ab3f3291ea5f73fce092 /src | |
| parent | feat(proxy): create full html document (diff) | |
| download | september-3c20c2e07fda5365a19fa300ece24ffd75951f5d.tar.xz september-3c20c2e07fda5365a19fa300ece24ffd75951f5d.zip | |
feat: favicon support
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)); |