diff --git a/src/handlers/static_files.rs b/src/handlers/static_files.rs index a9aa8ec..50c433b 100644 --- a/src/handlers/static_files.rs +++ b/src/handlers/static_files.rs @@ -12,6 +12,11 @@ pub async fn serve_static_files(path: web::Path) -> impl Responder { Some(file) => { let content_type = match file_path.split('.').next_back() { Some("ico") => "image/x-icon", + Some("png") => "image/png", + Some("jpg") | Some("jpeg") => "image/jpeg", + Some("gif") => "image/gif", + Some("svg") => "image/svg+xml", + Some("webp") => "image/webp", Some("css") => "text/css", Some("js") => "application/javascript", Some("html") => "text/html",