Browse Source

httpd: add Javascript media types

H. Peter Anvin 2 years ago
parent
commit
8a4d9d4b2c
1 changed files with 2 additions and 0 deletions
  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"  },