Skip to content

Commit

Permalink
Merge pull request #103 from NethServer/sdl-7002
Browse files Browse the repository at this point in the history
Update Nextcloud version to 28.0.9 NethServer/dev#7002
  • Loading branch information
stephdl authored Sep 10, 2024
2 parents 262405c + 2fa7c0f commit 4b81ee2
Show file tree
Hide file tree
Showing 6 changed files with 57 additions and 4 deletions.
2 changes: 1 addition & 1 deletion build-images.sh
Original file line number Diff line number Diff line change
Expand Up @@ -3,7 +3,7 @@
# Terminate on error
set -e

NC_VERSION=27.1.11
NC_VERSION=28.0.9

# Prepare variables for later use
images=()
Expand Down
11 changes: 11 additions & 0 deletions imageroot/actions/configure-module/90apps_management
Original file line number Diff line number Diff line change
@@ -0,0 +1,11 @@
#!/bin/bash

#
# Copyright (C) 2024 Nethesis S.r.l.
# SPDX-License-Identifier: GPL-3.0-or-later
#

# with nextcloud 28 the logreader app is compatible only with `file` log type
# see https://github.com/nextcloud/server/issues/45517
# Failed to get an iterator for log entries: Logreader application only supports "file" log_type
occ app:disable logreader
23 changes: 21 additions & 2 deletions imageroot/actions/create-module/20expandconfig
Original file line number Diff line number Diff line change
Expand Up @@ -33,9 +33,13 @@ events {
worker_connections 1024;
}
http {
include /etc/nginx/mime.types;
# Set .mjs and wasm that is missing in the mime.types
types {
text/javascript mjs;
application/wasm wasm;
}
default_type application/octet-stream;
log_format main '$remote_addr - $remote_user [$time_local] "$request" '
Expand Down Expand Up @@ -63,6 +67,12 @@ http {
server 127.0.0.1:9000;
}
# Set the `immutable` cache control options only for assets with a cache busting `v` argument
map $arg_v $asset_immutable {
"" "";
default ", immutable";
}
server {
listen 80;
Expand Down Expand Up @@ -179,8 +189,17 @@ http {
fastcgi_request_buffering off;
}
location ~ \.(?:css|js|svg|gif)$ {
# Serve static files
location ~ \.(?:css|js|mjs|svg|gif|ico|jpg|png|webp|wasm|tflite|map|ogg|flac)$ {
try_files $uri /index.php$request_uri;
# HTTP response headers borrowed from Nextcloud `.htaccess`
add_header Cache-Control "public, max-age=15778463$asset_immutable";
add_header Referrer-Policy "no-referrer" always;
add_header X-Content-Type-Options "nosniff" 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;
add_header X-XSS-Protection "1; mode=block" always;
expires 6M; # Cache-Control policy borrowed from `.htaccess`
access_log off; # Optional: Don't log access to assets
}
Expand Down
1 change: 1 addition & 0 deletions imageroot/update-module.d/10expand_config
20 changes: 20 additions & 0 deletions imageroot/update-module.d/15update_settings
Original file line number Diff line number Diff line change
@@ -0,0 +1,20 @@
#!/bin/bash

#
# Copyright (C) 2024 Nethesis S.r.l.
# SPDX-License-Identifier: GPL-3.0-or-later
#

# added for nextcloud 28 (1.0.8)
# set trusted proxies to avoid warnings
occ config:system:set trusted_proxies 0 --value='127.0.0.1'

# set maintenance window start (maintenance cron will run at 1:00)
occ config:system:set maintenance_window_start --value=1 --type=integer

# with nextcloud 28 the logreader app is compatible only with `file` log type
# see https://github.com/nextcloud/server/issues/45517
# Failed to get an iterator for log entries: Logreader application only supports "file" log_type
occ app:disable logreader
# added for nextcloud 28 (1.0.8)
# end
4 changes: 3 additions & 1 deletion nextcloud/ns.config.php
Original file line number Diff line number Diff line change
Expand Up @@ -5,5 +5,7 @@
'upgrade.disable-web' => true,
'updatechecker' => false,
'check_for_working_wellknown_setup' => false,
'log_type' => 'errorlog'
'log_type' => 'errorlog',
'maintenance_window_start' => 1,
'trusted_proxies' => ['127.0.0.1'],
);

0 comments on commit 4b81ee2

Please sign in to comment.