chore: update nginx configuration

- update static file extensions
 - add mjs to mimetype
   https://github.com/hoellen/docker-nextcloud/issues/60
 - remove legacy header
   https://github.com/hoellen/docker-nextcloud/pull/61
This commit is contained in:
hoellen 2024-01-02 10:23:42 +01:00
parent dec3a7f789
commit bf3c76a5f8
2 changed files with 6 additions and 2 deletions

View File

@ -18,7 +18,6 @@ server {
add_header Referrer-Policy "no-referrer" always;
add_header X-Content-Type-Options "nosniff" always;
add_header X-Download-Options "noopen" always;
add_header X-Frame-Options "SAMEORIGIN" always;
add_header X-Permitted-Cross-Domain-Policies "none" always;
add_header X-Robots-Tag "noindex, nofollow" always;
@ -67,7 +66,7 @@ server {
index index.php;
}
location ~ \.(?:css|js|svg|gif|map)$ {
location ~ \.(?:css|js|mjs|svg|gif|png|jpg|ico|wasm|tflite|map|ogg|flac)$ {
try_files $uri /index.php$uri$is_args$args;
expires 6M;
access_log off;

View File

@ -9,6 +9,11 @@ events {
http {
include /etc/nginx/mime.types;
# Add .mjs as a file extension for javascript
# https://github.com/nextcloud/server/pull/36057
types {
application/javascript mjs;
}
default_type application/octet-stream;
access_log /nginx/logs/access.log combined;