1
Fork 0
mirror of https://github.com/RGBCube/serenity synced 2025-07-25 14:37:46 +00:00

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

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))