[PATCH] Mime type for Web Assembly

Chris Couzens ccouzens at gmail.com
Fri Nov 29 21:27:46 UTC 2019


# HG changeset patch
# User Chris Couzens <ccouzens at gmail.com>
# Date 1575032353 0
#      Fri Nov 29 12:59:13 2019 +0000
# Node ID d826b28f25157901dff4a010cca180a0d13e7c35
# Parent  d13eddd9e2529b4bc30dc00aad959bd10ced4c33
Mime.types: Add Web Assembly

Web assembly is a web standard and so nginx should support hosting
it by default.

Not serving the correct mime type causes standard compliant browsers
to reject it.

https://www.w3.org/TR/wasm-web-api-1/#streaming-modules

> If the Response is not CORS-same-origin, does not represent an ok
> status, or does not match the `application/wasm` MIME type, the
> returned promise will be rejected with a TypeError;

diff -r d13eddd9e252 -r d826b28f2515 conf/mime.types
--- a/conf/mime.types Tue Nov 19 17:18:58 2019 +0300
+++ b/conf/mime.types Fri Nov 29 12:59:13 2019 +0000
@@ -8,6 +8,7 @@
     application/javascript                           js;
     application/atom+xml                             atom;
     application/rss+xml                              rss;
+    application/wasm                                 wasm;

     text/mathml                                      mml;
     text/plain                                       txt;


More information about the nginx-devel mailing list