Skip to content

Commit

Permalink
Merge pull request #396 from linuxserver/develop-mime
Browse files Browse the repository at this point in the history
Avoid duplicate mime definition
  • Loading branch information
thespad committed Dec 22, 2023
2 parents b22dc78 + 4178035 commit aae9593
Showing 1 changed file with 9 additions and 9 deletions.
18 changes: 9 additions & 9 deletions root/defaults/nginx/site-confs/default.conf.sample
Original file line number Diff line number Diff line change
Expand Up @@ -59,15 +59,6 @@ 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 {
text/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 Expand Up @@ -151,6 +142,15 @@ server {
location ~ \.wasm$ {
default_type application/wasm;
}

location ~ \.js$ {
default_type text/javascript;
}

location ~ \.mjs$ {
default_type text/javascript;
}

}

location ~ \.woff2?$ {
Expand Down

0 comments on commit aae9593

Please sign in to comment.