LibCore: Add text/css mime type

Firefox throws out css files with MIME type not being "text/css", so
let's add it to make attached CSS working on WebServer. :^)
This commit is contained in:
Maciej 2022-03-19 18:01:37 +01:00 committed by Andreas Kling
parent 273b69f947
commit b172bf4f84
Notes: sideshowbarker 2024-07-17 17:05:29 +09:00

View File

@ -75,6 +75,8 @@ String guess_mime_type_based_on_filename(StringView path)
return "text/markdown";
if (path.ends_with(".html", CaseSensitivity::CaseInsensitive) || path.ends_with(".htm", CaseSensitivity::CaseInsensitive))
return "text/html";
if (path.ends_with(".css", CaseSensitivity::CaseInsensitive))
return "text/css";
if (path.ends_with(".js", CaseSensitivity::CaseInsensitive))
return "application/javascript";
if (path.ends_with(".json", CaseSensitivity::CaseInsensitive))