From ed12d8a3394206c60149fc1b3696bda72ad6196d Mon Sep 17 00:00:00 2001 From: Tal Kedar Date: Fri, 10 Jan 2025 19:15:44 -0500 Subject: [PATCH] http: add `.mjs` extension to default mime types Associate file extension `.mjs` with `application/javascript`. Context: common output of static site generators. There's little risk of ambiguity for this extension, so might as well support it out of the box. [ Subject tweak - Andrew ] Signed-off-by: Andrew Clayton --- src/nxt_http_static.c | 1 + 1 file changed, 1 insertion(+) diff --git a/src/nxt_http_static.c b/src/nxt_http_static.c index 67591595a..d56ec5870 100644 --- a/src/nxt_http_static.c +++ b/src/nxt_http_static.c @@ -957,6 +957,7 @@ nxt_http_static_mtypes_init(nxt_mp_t *mp, nxt_lvlhsh_t *hash) { nxt_string("text/x-rst"), ".rst" }, { nxt_string("application/javascript"), ".js" }, + { nxt_string("application/javascript"), ".mjs" }, { nxt_string("application/json"), ".json" }, { nxt_string("application/xml"), ".xml" }, { nxt_string("application/rss+xml"), ".rss" },