summaryrefslogtreecommitdiffhomepage
path: root/src
diff options
context:
space:
mode:
authorTal Kedar <tal.kedar@k2dq.com>2025-01-10 19:15:44 -0500
committerAndrew Clayton <a.clayton@nginx.com>2025-01-14 04:08:15 +0000
commited12d8a3394206c60149fc1b3696bda72ad6196d (patch)
tree75158fecaabb36e88cfb68fda08982cbc3204548 /src
parentd0dbba3b9f2f6a2e0e0d6e9862a4c6c1ab603242 (diff)
downloadunit-ed12d8a3394206c60149fc1b3696bda72ad6196d.tar.gz
unit-ed12d8a3394206c60149fc1b3696bda72ad6196d.tar.bz2
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 <a.clayton@nginx.com>
Diffstat (limited to 'src')
-rw-r--r--src/nxt_http_static.c1
1 files changed, 1 insertions, 0 deletions
diff --git a/src/nxt_http_static.c b/src/nxt_http_static.c
index 67591595..d56ec587 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" },