Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Add mjs MIME type #2057

Merged
merged 2 commits into from Mar 15, 2023
Merged

Add mjs MIME type #2057

merged 2 commits into from Mar 15, 2023

Conversation

axilleas
Copy link
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.
Copy link
Member

@ioquatix ioquatix left a comment

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
14 checks passed
@axilleas axilleas deleted the patch-1 branch March 17, 2023 10:43
@axilleas
Copy link
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
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
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.

None yet

2 participants