浏览代码

httpd: add Javascript media types

H. Peter Anvin 2 年之前
父节点
当前提交
8a4d9d4b2c
共有 1 个文件被更改,包括 2 次插入0 次删除
  1. 2 0
      esp32/max80/httpd.c

+ 2 - 0
esp32/max80/httpd.c

@@ -68,6 +68,8 @@ static const struct mime_type mime_types[] = {
     { ".ico",   4, "image/png"                 }, /* favicon.ico */
     { ".svg",   4, "image/svg+xml"             },
     { ".pdf",   4, "application/pdf"           },
+    { ".js",    3, "text/javascript"           },
+    { ".mjs",   4, "text/javascript"           },
     { ".xml",   4, "text/xml"                  },
     { ".bin",   4, "application/octet-stream"  },
     { ".fw",    3, "application/octet-stream"  },