Skip to content

Commit

Permalink
Merge pull request #405 from linuxserver/conf-fix-test
Browse files Browse the repository at this point in the history
maybe fix nextcloud?
  • Loading branch information
nemchik authored Jan 3, 2024
1 parent 6675775 commit ccb0036
Show file tree
Hide file tree
Showing 2 changed files with 8 additions and 10 deletions.
12 changes: 2 additions & 10 deletions root/defaults/nginx/site-confs/default.conf.sample
Original file line number Diff line number Diff line change
@@ -1,4 +1,4 @@
## Version 2023/12/25 - Changelog: https://github.com/linuxserver/docker-nextcloud/commits/master/root/defaults/nginx/site-confs/default.conf.sample
## Version 2024/01/03 - Changelog: https://github.com/linuxserver/docker-nextcloud/commits/master/root/defaults/nginx/site-confs/default.conf.sample

# Set the `immutable` cache control options only for assets with a cache busting `v` argument
map $arg_v $asset_immutable {
Expand Down Expand Up @@ -36,7 +36,7 @@ server {
gzip_comp_level 4;
gzip_min_length 256;
gzip_proxied expired no-cache no-store private no_last_modified no_etag auth;
gzip_types application/atom+xml text/javascript application/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/wasm application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;
gzip_types application/atom+xml text/javascript application/json application/ld+json application/manifest+json application/rss+xml application/vnd.geo+json application/vnd.ms-fontobject application/wasm application/x-font-ttf application/x-web-app-manifest+json application/xhtml+xml application/xml font/opentype image/bmp image/svg+xml image/x-icon text/cache-manifest text/css text/plain text/vcard text/vnd.rim.location.xloc text/vtt text/x-component text/x-cross-domain-policy;

# Pagespeed is not supported by Nextcloud, so if your server is built
# with the `ngx_pagespeed` module, uncomment this line to disable it.
Expand Down Expand Up @@ -143,14 +143,6 @@ server {
default_type application/wasm;
}

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

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

}

location ~ \.woff2?$ {
Expand Down
6 changes: 6 additions & 0 deletions root/etc/s6-overlay/s6-rc.d/init-nextcloud-config/run
Original file line number Diff line number Diff line change
Expand Up @@ -168,3 +168,9 @@ if [ ! -s /config/www/nextcloud/config/config.php ]; then
elif [ -f /config/www/nextcloud/config/config.php ]; then
sed -i "s|/app/www/public/data|/data|g" /config/www/nextcloud/config/config.php
fi

#modify javascript mime type and add .mjs support
if [ -s /etc/nginx/mime.types ]; then
sed -i 's|\bjs;|js mjs;|g' /etc/nginx/mime.types
sed -i 's|\bapplication/javascript|text/javascript|g' /etc/nginx/mime.types
fi

0 comments on commit ccb0036

Please sign in to comment.