pub fn get_mime_type(path: &str) -> &'static str {
let extension = path.rsplit('.').next().unwrap_or("");
match extension.to_lowercase().as_str() {
"html" | "htm" => "text/html",
"css" => "text/css",
"txt" => "text/plain",
"json" => "application/json",
"xml" => "application/xml",
"csv" => "text/csv",
"yaml" | "yml" => "application/yaml",
"map" => "application/json",
"js" => "application/javascript",
"wasm" => "application/wasm",
"png" => "image/png",
"jpg" | "jpeg" => "image/jpeg",
"gif" => "image/gif",
"svg" => "image/svg+xml",
"webp" => "image/webp",
"avif" => "image/avif",
"heic" => "image/heic",
"ico" => "image/x-icon",
"woff2" => "font/woff2",
"woff" => "font/woff",
"eot" => "application/vnd.ms-fontobject",
"ttf" => "font/ttf",
"otf" => "font/otf",
"mp3" => "audio/mpeg",
"ogg" => "audio/ogg",
"mp4" => "video/mp4",
"webm" => "video/webm",
"webmanifest" => "application/manifest+json",
"pdf" => "application/pdf",
"zip" => "application/zip",
_ => "application/octet-stream",
}
}