-
Notifications
You must be signed in to change notification settings - Fork 1.9k
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
fix(admin): Add a note about JavaScript modules to Nextcloud 28 upgrade guides #11471
Conversation
…de guides Signed-off-by: Ferdinand Thiessen <[email protected]>
1b7368c
to
b28c72b
Compare
/backport to stable28 |
At least on Debian, the MIME type is added automatically for all webservers, with their own configs or Just checked back: Nginx uses What I was actually missing in the docs was not the MIME type (still good to mention it), but the rewrites: The default/example webserver configs rewrite everything to Another thing is the
All of this can be usually achieved by adding |
Hello there, We hope that the review process is going smooth and is helpful for you. We want to ensure your pull request is reviewed to your satisfaction. If you have a moment, our community management team would very much appreciate your feedback on your experience with this PR review process. Your feedback is valuable to us as we continuously strive to improve our community developer experience. Please take a moment to complete our short survey by clicking on the following link: https://cloud.nextcloud.com/apps/forms/s/i9Ago4EQRZ7TWxjfmeEpPkf6 Thank you for contributing to Nextcloud and we hope to hear from you soon! |
@MichaIng Nice summary. Do we need to do anything else here or is this PR sufficient? |
@st3iny |
* As some core app now make use of JavaScript modules, make sure your web server is serving ``.mjs`` files with JavaScript MIME type. | ||
When using Apache with ``.htaccess`` configuration this will be done automatically, if your Apache is not configured to use the ``.htaccess`` files make sure ``.mjs`` is added as a file extension for JavaScript in ``conf/mime.types``. | ||
For NGinx please refer to the our recommended :ref:`nginx configuration<nginx-config>`. |
There was a problem hiding this comment.
Choose a reason for hiding this comment
The reason will be displayed to describe this comment to others. Learn more.
* As some core app now make use of JavaScript modules, make sure your web server is serving ``.mjs`` files with JavaScript MIME type. | |
When using Apache with ``.htaccess`` configuration this will be done automatically, if your Apache is not configured to use the ``.htaccess`` files make sure ``.mjs`` is added as a file extension for JavaScript in ``conf/mime.types``. | |
For NGinx please refer to the our recommended :ref:`nginx configuration<nginx-config>`. | |
* As some core app now make use of JavaScript modules, make sure your web server is not rewriting requests to ``.mjs`` files, but serves them with `text/javascript` MIME type and proper `Cache-Control` header, like ``.js`` and other static file extensions. | |
* When using Apache with ``.htaccess`` configuration, this will be done automatically. | |
* For Nginx, please refer to the our recommended :ref:`Nginx configuration<nginx-config>`. | |
* For other setups, make sure to add ``.mjs`` to the list of static file extensions in web server configs and in case define its MIME type in `/etc/mime.types`. |
- I hope nested lists work like that.
- The last point is moreless taken from the above point about
.ogg
and.flac
files. Most web server configs have one or more blocks with a list of all static file extensions Nextcloud makes use of. Adding.mjs
there to be handled like.js
and others, should be sufficient in most cases. The MIME type might be the only exception on older distros, where default/etc/mime.types
or related default web server configs do not contain.mjs
yet.
/backport to stable29 |
I merged the pr to finally get it in. @MichaIng would you mind shooting a follow-up with your suggestions? |
To cover rewrites, Cache-Control header, and give a concrete config file for MIME types, as suggested here: #11471 (comment) Signed-off-by: MichaIng <[email protected]>
To cover rewrites, Cache-Control header, and give a concrete config file for MIME types, as suggested here: #11471 (comment) Signed-off-by: MichaIng <[email protected]>
To cover rewrites, Cache-Control header, and give a concrete config file for MIME types, as suggested here: #11471 (comment) Signed-off-by: MichaIng <[email protected]>
To cover rewrites, Cache-Control header, and give a concrete config file for MIME types, as suggested here: #11471 (comment) Signed-off-by: MichaIng <[email protected]>
To cover rewrites, Cache-Control header, and give a concrete config file for MIME types, as suggested here: #11471 (comment) Signed-off-by: MichaIng <[email protected]>
To cover rewrites, Cache-Control header, and give a concrete config file for MIME types, as suggested here: #11471 (comment) Signed-off-by: MichaIng <[email protected]>
To cover rewrites, Cache-Control header, and give a concrete config file for MIME types, as suggested here: #11471 (comment) Signed-off-by: MichaIng <[email protected]>
☑️ Resolves
🖼️ Screenshots