[fix](trx-frontend-http): serve safari-friendly favicon
Co-authored-by: Codex <codex@openai.com> Signed-off-by: Stan Grams <sjg@haxx.space>
This commit is contained in:
@@ -4,7 +4,8 @@
|
||||
<meta charset="utf-8">
|
||||
<meta name="viewport" content="width=device-width, initial-scale=1.0, viewport-fit=cover">
|
||||
<title>trx-rs v{ver}</title>
|
||||
<link rel="icon" href="/favicon.ico?v=2" />
|
||||
<link rel="icon" type="image/png" href="/favicon.png?v=3" />
|
||||
<link rel="apple-touch-icon" href="/favicon.png?v=3" />
|
||||
<link rel="stylesheet" href="https://cdn.jsdelivr.net/npm/@fontsource/dseg14-classic/400.css" />
|
||||
<link rel="stylesheet" href="/style.css" />
|
||||
<link rel="stylesheet" href="https://unpkg.com/leaflet@1.9.4/dist/leaflet.css" />
|
||||
|
||||
@@ -712,6 +712,7 @@ pub fn configure(cfg: &mut web::ServiceConfig) {
|
||||
.service(select_rig)
|
||||
.service(crate::server::audio::audio_ws)
|
||||
.service(favicon)
|
||||
.service(favicon_png)
|
||||
.service(logo)
|
||||
.service(style_css)
|
||||
.service(app_js)
|
||||
@@ -739,6 +740,13 @@ async fn favicon() -> impl Responder {
|
||||
.body(FAVICON_BYTES)
|
||||
}
|
||||
|
||||
#[get("/favicon.png")]
|
||||
async fn favicon_png() -> impl Responder {
|
||||
HttpResponse::Ok()
|
||||
.insert_header((header::CONTENT_TYPE, "image/png"))
|
||||
.body(FAVICON_BYTES)
|
||||
}
|
||||
|
||||
#[get("/logo.png")]
|
||||
async fn logo() -> impl Responder {
|
||||
HttpResponse::Ok()
|
||||
|
||||
Reference in New Issue
Block a user