web: api: add mimes type map (#890)

This commit is contained in:
ReenigneArcher
2023-02-08 21:35:02 -05:00
committed by GitHub
parent 2c4e293e21
commit a21e231cae
2 changed files with 33 additions and 8 deletions

View File

@@ -16,4 +16,23 @@ constexpr auto PORT_HTTPS = 1;
void start();
} // namespace confighttp
// mime types map
const std::map<std::string, std::string> mime_types = {
{ "css", "text/css" },
{ "gif", "image/gif" },
{ "htm", "text/html" },
{ "html", "text/html" },
{ "ico", "image/x-icon" },
{ "jpeg", "image/jpeg" },
{ "jpg", "image/jpeg" },
{ "js", "application/javascript" },
{ "json", "application/json" },
{ "png", "image/png" },
{ "svg", "image/svg+xml" },
{ "ttf", "font/ttf" },
{ "txt", "text/plain" },
{ "woff2", "font/woff2" },
{ "xml", "text/xml" },
};
#endif // SUNSHINE_CONFIGHTTP_H