Skip to content

Commit

Permalink
Add mjs MIME type (#2057)
Browse files Browse the repository at this point in the history
mjs is a JavaScript module and has the same MIME type as JavaScript.
See https://developer.mozilla.org/en-US/docs/Web/HTTP/Basics_of_HTTP/MIME_types/Common_types.
  • Loading branch information
axilleas committed Mar 15, 2023
1 parent d25fedd commit f75d08e
Show file tree
Hide file tree
Showing 2 changed files with 2 additions and 0 deletions.
1 change: 1 addition & 0 deletions CHANGELOG.md
Expand Up @@ -13,6 +13,7 @@ All notable changes to this project will be documented in this file. For info on
- `rack.input` is now optional, and if missing, will raise an error. Use this to fail on multipart parsing a request without an input body. ([#2018](https://github.com/rack/rack/pull/2018), [@ioquatix])
- Introduce `module Rack::BadRequest` which is included in multipart and query parser errors. ([#2019](https://github.com/rack/rack/pull/2019), [@ioquatix])
- MIME type for JavaScript files (`.js`) changed from `application/javascript` to `text/javascript` ([`1bd0f15`](https://github.com/rack/rack/commit/1bd0f1597d8f4a90d47115f3e156a8ce7870c9c8))
- Add `.mjs` MIME type ([#2057](https://github.com/rack/rack/pull/2057), [@axilleas])

## [3.0.4.1] - 2023-01-17

Expand Down
1 change: 1 addition & 0 deletions lib/rack/mime.rb
Expand Up @@ -338,6 +338,7 @@ def match?(value, matcher)
".mif" => "application/vnd.mif",
".mime" => "message/rfc822",
".mj2" => "video/mj2",
".mjs" => "text/javascript",
".mlp" => "application/vnd.dolby.mlp",
".mmd" => "application/vnd.chipnuts.karaoke-mmd",
".mmf" => "application/vnd.smaf",
Expand Down

0 comments on commit f75d08e

Please sign in to comment.