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 the proper Nginx mime type for mjs files #737

Closed
wants to merge 1 commit into from
Closed

Conversation

stof
Copy link
Contributor

@stof stof commented Jun 25, 2024

The HTML spec requires getting a content-type of application/javascript for ES modules, rejecting them otherwise. And browsers are respecting this spec.
As it is common to use the .mjs for ES modules (because of the convention introduced in node.js, which has also been adopted by some frontend packages when they want to start shipping a version using modules), having the right mime types for it in the nginx config is a must-have IMO.

This matches the configuration used in the h5bp nginx configuration

@stof stof requested a review from a team as a code owner June 25, 2024 16:10
@edmorley edmorley requested review from dzuelke and removed request for a team June 25, 2024 16:12
@dzuelke dzuelke self-assigned this Jun 27, 2024
@dzuelke dzuelke mentioned this pull request Jul 1, 2024
dzuelke added a commit that referenced this pull request Jul 2, 2024
This is compliant with RFC 9239.

The normal .js extension remains on application/javascript as defined in the OEM mime.types config.

See https://trac.nginx.org/nginx/ticket/2216 for upstream change proposal.

Closes #737

GUS-W-16142337
@dzuelke dzuelke closed this in #740 Jul 2, 2024
@stof stof deleted the patch-1 branch July 2, 2024 09:34
robinwo pushed a commit to robinwo/heroku-buildpack-php that referenced this pull request Sep 13, 2024
This is compliant with RFC 9239.

The normal .js extension remains on application/javascript as defined in the OEM mime.types config.

See https://trac.nginx.org/nginx/ticket/2216 for upstream change proposal.

Closes heroku#737

GUS-W-16142337
robinwo pushed a commit to robinwo/heroku-buildpack-php that referenced this pull request Sep 13, 2024
This is compliant with RFC 9239.

The normal .js extension remains on application/javascript as defined in the OEM mime.types config.

See https://trac.nginx.org/nginx/ticket/2216 for upstream change proposal.

Closes heroku#737

GUS-W-16142337
robinwo pushed a commit to robinwo/heroku-buildpack-php that referenced this pull request Sep 13, 2024
This is compliant with RFC 9239.

The normal .js extension remains on application/javascript as defined in the OEM mime.types config.

See https://trac.nginx.org/nginx/ticket/2216 for upstream change proposal.

Closes heroku#737

GUS-W-16142337
robinwo pushed a commit to robinwo/heroku-buildpack-php that referenced this pull request Sep 13, 2024
This is compliant with RFC 9239.

The normal .js extension remains on application/javascript as defined in the OEM mime.types config.

See https://trac.nginx.org/nginx/ticket/2216 for upstream change proposal.

Closes heroku#737

GUS-W-16142337
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