mirror of
https://github.com/linuxserver/docker-nextcloud.git
synced 2026-02-19 23:03:50 +08:00
Merge pull request #405 from linuxserver/conf-fix-test
maybe fix nextcloud?
This commit is contained in:
commit
360dce038d
@ -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 {
|
||||
@ -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.
|
||||
@ -143,14 +143,6 @@ server {
|
||||
default_type application/wasm;
|
||||
}
|
||||
|
||||
location ~ \.js$ {
|
||||
default_type text/javascript;
|
||||
}
|
||||
|
||||
location ~ \.mjs$ {
|
||||
default_type text/javascript;
|
||||
}
|
||||
|
||||
}
|
||||
|
||||
location ~ \.woff2?$ {
|
||||
|
||||
@ -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
|
||||
|
||||
Loading…
x
Reference in New Issue
Block a user