Merge pull request #9909 from nextcloud/feat/esm-scripts-nginx

Adjust nginx configuration to support mjs for javascript
This commit is contained in:
Ferdinand Thiessen
2023-03-27 13:54:34 +02:00
committed by GitHub
2 changed files with 18 additions and 0 deletions

View File

@@ -80,6 +80,15 @@ server {
# Remove X-Powered-By, which is an information leak
fastcgi_hide_header X-Powered-By;
# Add .mjs as a file extension for javascript
# Either include it in the default mime.types list
# or include you can include that list explicitly and add the file extension
# only for Nextcloud like below:
include mime.types;
types {
application/javascript js mjs;
}
# Specify how to handle directories -- specifying `/index.php$request_uri`
# here as the fallback means that Nginx always exhibits the desired behaviour
# when a client requests a path that corresponds to a directory that exists

View File

@@ -47,6 +47,15 @@ server {
# could take several months.
#add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload" always;
# Add .mjs as a file extension for javascript
# Either include it in the default mime.types list
# or include you can include that list explicitly and add the file extension
# only for Nextcloud like below:
include mime.types;
types {
application/javascript js mjs;
}
location = /robots.txt {
allow all;
log_not_found off;