Skip to content

Commit

Permalink
Adjust nginx configuration to support mjs for javascript
Browse files Browse the repository at this point in the history
Signed-off-by: Ferdinand Thiessen <[email protected]>
  • Loading branch information
susnux committed Mar 16, 2023
1 parent 4a25e81 commit c1c9b0a
Show file tree
Hide file tree
Showing 2 changed files with 18 additions and 0 deletions.
9 changes: 9 additions & 0 deletions admin_manual/installation/nginx-root.conf.sample
Original file line number Diff line number Diff line change
Expand Up @@ -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
Expand Down
9 changes: 9 additions & 0 deletions admin_manual/installation/nginx-subdir.conf.sample
Original file line number Diff line number Diff line change
Expand Up @@ -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;
Expand Down

0 comments on commit c1c9b0a

Please sign in to comment.