add some headers to the favicon
* content-type to image/png * cache control for 24h
This commit is contained in:
parent
1aeb2c1bf6
commit
d2f9578b68
1 changed files with 4 additions and 1 deletions
|
@ -97,5 +97,8 @@ fn handle_tar(req: &HttpRequest<PathBuf>) -> impl Responder {
|
|||
}
|
||||
|
||||
fn favicon_ico(_req: &HttpRequest<PathBuf>) -> impl Responder {
|
||||
bytes::Bytes::from_static(include_bytes!("favicon.png"))
|
||||
HttpResponse::Ok()
|
||||
.content_type("image/png")
|
||||
.header("Cache-Control", "only-if-cached, max-age=86400")
|
||||
.body(bytes::Bytes::from_static(include_bytes!("favicon.png")))
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue