mirror of
https://github.com/nginx/nginx.git
synced 2025-06-07 17:52:38 +08:00
MIME: added audio/x-wav type.
Chrome and other browsers implementing Opaque Request Blocking block `<audio>` elements from playing if it cannot guess it is an audio file and the Content-Type header does not say it is that [1]. This is currently the case for WAV files served by Nginx instances configured to use the included `mime.types` file. Chrome is unable to guess a file's type if the server responds with 206 Partial Content, which is typically the case for WAV files. Unfortunately, there is no official MIME type for WAV files. I decided to go with `audio/x-wav` since it is used by Apache HTTPD [2] and the media-types Debian package [3]. WAV files are supported by browsers used by 98.01% of the world's population [4]. [1]: https://groups.google.com/a/chromium.org/g/blink-dev/c/ScjhKz3Z6U4/m/5i_0V7ogAwAJ [2]:4a9cd1fccf/docs/conf/mime.types (L1526)
[3]:8b715798bb/mime.types (L1845)
[4]: https://caniuse.com/wav
This commit is contained in:
parent
930caed3bf
commit
13fb206685
@ -83,6 +83,7 @@ types {
|
||||
audio/ogg ogg;
|
||||
audio/x-m4a m4a;
|
||||
audio/x-realaudio ra;
|
||||
audio/x-wav wav;
|
||||
|
||||
video/3gpp 3gpp 3gp;
|
||||
video/mp2t ts;
|
||||
|
Loading…
Reference in New Issue
Block a user