From 52ec6403d6c8377702340a83aea2b1eeb71eb9f9 Mon Sep 17 00:00:00 2001 From: Scott Lamb Date: Sat, 2 Oct 2021 08:29:56 -0700 Subject: [PATCH] add svg mime type mapping, sort mappings --- server/src/web.rs | 5 +++-- 1 file changed, 3 insertions(+), 2 deletions(-) diff --git a/server/src/web.rs b/server/src/web.rs index f071a90..8a17665 100644 --- a/server/src/web.rs +++ b/server/src/web.rs @@ -1336,15 +1336,16 @@ impl<'a> StaticFileRequest<'a> { }; let ext = &path[last_dot + 1..]; let mime = match ext { + "css" => "text/css", "html" => "text/html", "ico" => "image/x-icon", "js" | "map" => "text/javascript", "json" => "application/json", "png" => "image/png", - "webmanifest" => "application/manifest+json", + "svg" => "image/svg+xml", "txt" => "text/plain", + "webmanifest" => "application/manifest+json", "woff2" => "font/woff2", - "css" => "text/css", _ => return None, };