Skip to content

Commit ed12d8a

Browse files
kedartalac000
authored andcommitted
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>
1 parent d0dbba3 commit ed12d8a

File tree

1 file changed

+1
-0
lines changed

1 file changed

+1
-0
lines changed

src/nxt_http_static.c

Lines changed: 1 addition & 0 deletions
Original file line numberDiff line numberDiff line change
@@ -957,6 +957,7 @@ nxt_http_static_mtypes_init(nxt_mp_t *mp, nxt_lvlhsh_t *hash)
957957
{ nxt_string("text/x-rst"), ".rst" },
958958

959959
{ nxt_string("application/javascript"), ".js" },
960+
{ nxt_string("application/javascript"), ".mjs" },
960961
{ nxt_string("application/json"), ".json" },
961962
{ nxt_string("application/xml"), ".xml" },
962963
{ nxt_string("application/rss+xml"), ".rss" },

0 commit comments

Comments
 (0)