remove favicon
This commit is contained in:
parent
91fee3387a
commit
37cfeaebec
2 changed files with 0 additions and 11 deletions
BIN
src/favicon.png
BIN
src/favicon.png
Binary file not shown.
Before Width: | Height: | Size: 135 KiB |
11
src/web.rs
11
src/web.rs
|
@ -44,7 +44,6 @@ pub async fn run(bind_addr: &str, root: &PathBuf) -> std::io::Result<()> {
|
|||
App::new()
|
||||
.app_data(root_.clone())
|
||||
.wrap(middleware::Logger::default())
|
||||
.service(favicon_ico)
|
||||
.service(static_files)
|
||||
})
|
||||
.bind(bind_addr)?
|
||||
|
@ -53,13 +52,3 @@ pub async fn run(bind_addr: &str, root: &PathBuf) -> std::io::Result<()> {
|
|||
log::info!("Serving files from {:?}", &root);
|
||||
s.await
|
||||
}
|
||||
|
||||
const FAVICON_ICO: &[u8] = include_bytes!("favicon.png");
|
||||
|
||||
#[get("/favicon.ico")]
|
||||
async fn favicon_ico() -> impl Responder {
|
||||
HttpResponse::Ok()
|
||||
.content_type("image/png")
|
||||
.append_header(("Cache-Control", "only-if-cached, max-age=86400"))
|
||||
.body(FAVICON_ICO)
|
||||
}
|
||||
|
|
Loading…
Add table
Reference in a new issue