Skip to content

Commit cb2fc60

Browse files
committed
v8.25
- DietPi-Software | Nextcloud: Update Lighttpd and Nginx configs, especially add .mjs files to list of static resources: nextcloud/server#38688
1 parent 771a336 commit cb2fc60

2 files changed

Lines changed: 3 additions & 6 deletions

File tree

.conf/dps_114/lighttpd.nextcloud.conf

Lines changed: 2 additions & 5 deletions
Original file line numberDiff line numberDiff line change
@@ -9,7 +9,6 @@ url.redirect += (
99
)
1010

1111
$HTTP["url"] =~ "^/nextcloud($|/)" {
12-
1312
# Hardening
1413
# - Directories
1514
$HTTP["url"] =~ "^/nextcloud/(build|tests|config|lib|3rdparty|templates|data)($|/)" { url.access-deny = ("") }
@@ -18,7 +17,7 @@ $HTTP["url"] =~ "^/nextcloud($|/)" {
1817
# - Directory listing
1918
dir-listing.activate = "disable"
2019
# - Security and cache control headers for static resources
21-
$HTTP["url"] =~ "\.(css|js|svg|gif|png|jpg|ico|wasm|tflite|map|woff2?)$" {
20+
$HTTP["url"] =~ "\.(css|js|mjs|svg|gif|png|jpg|ico|wasm|tflite|map|woff2?)$" {
2221
setenv.add-response-header += (
2322
"Referrer-Policy" => "no-referrer",
2423
"X-Content-Type-Options" => "nosniff",
@@ -30,15 +29,13 @@ $HTTP["url"] =~ "^/nextcloud($|/)" {
3029
"Cache-Control" => "public, max-age=15778463",
3130
)
3231
}
33-
3432
# Rewrites
3533
url.rewrite-once += (
3634
"^/nextcloud/remote/(.*)" => "/nextcloud/remote.php/$1",
3735
"^/nextcloud/ocm-provider($|/\?.*)" => "/nextcloud/index.php$1"
3836
)
3937
url.rewrite-if-not-file += (
40-
"^/nextcloud/((core/ajax/update|cron|public|remote|status|ocs/v[12])\.php|ocs-provider/|updater/)" => "",
38+
"^/nextcloud/((core/ajax/update|cron|public|remote|status|ocs/v[12]|richdocumentscode(_arm64)?/proxy)\.php|ocs-provider/|updater/)" => "",
4139
"^/nextcloud(.*)" => "/nextcloud/index.php$1"
4240
)
43-
4441
}

.conf/dps_114/nginx.nextcloud.conf

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -77,7 +77,7 @@ location ^~ /nextcloud {
7777
fastcgi_max_temp_file_size 0; # Allow downloads > 1 GiB: https://github.com/nextcloud/documentation/pull/7979
7878
}
7979

80-
location ~ \.(?:css|js|svg|gif|png|jpg|ico|wasm|tflite|map)$ {
80+
location ~ \.(?:css|js|mjs|svg|gif|png|jpg|ico|wasm|tflite|map)$ {
8181
try_files $uri /nextcloud/index.php$request_uri;
8282
expires 6M; # Cache-Control policy borrowed from `.htaccess`
8383
access_log off; # Optional: Don't log access to assets

0 commit comments

Comments
 (0)