Skip to content

Add mjs MIME type#2057

Merged
ioquatix merged 2 commits into
rack:mainfrom
axilleas:patch-1
Mar 15, 2023
Merged

Add mjs MIME type#2057
ioquatix merged 2 commits into
rack:mainfrom
axilleas:patch-1

Conversation

@axilleas

Copy link
Copy Markdown
Contributor

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.

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.

@ioquatix ioquatix left a comment

Copy link
Copy Markdown
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

LGTM.

@ioquatix ioquatix merged commit f75d08e into rack:main Mar 15, 2023
@axilleas axilleas deleted the patch-1 branch March 17, 2023 10:43
@axilleas

Copy link
Copy Markdown
Contributor Author

@ioquatix thanks for merging! I see this is not included in the new 3.0.7 patch release, was this intended? If yes, do you know when a new release will be out with this change? Thanks!

PS. Some backstory, we're trying to use mermaid.js with Nanoc's local live webserver (adsf) which relies on Rack, and .mjs mimetypes are not supported, so the diagrams are now broken.

@ioquatix

Copy link
Copy Markdown
Member

I don't have a strong opinion about back porting this or not. We have made a bit of a mess of the 3.0.x release series w.r.t. to back porting stuff. However, I think we'd like to avoid back porting unless strictly needed for security or major bugs.

Regarding this feature, I'd say the earliest we will see it is Rack 3.1. However, that doesn't prevent you from manually adding it in your app. i.e.

Rack::Mime::MIME_TYPES['.mjs'] = ... etc

@axilleas

Copy link
Copy Markdown
Contributor Author

@ioquatix that's sounds reasonable, thanks for the explanation 🙂

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants