From 02592a3c0a9b33d851a5b71390c9a6571287c355 Mon Sep 17 00:00:00 2001 From: MichaIng Date: Wed, 21 Feb 2024 21:12:28 +0100 Subject: [PATCH] Live patch 0 v9.1 (#6933) - Live patch 0 | Fix Nextcloud Nginx config, serving wrong MIME types --- .conf/dps_114/nginx.nextcloud.conf | 2 +- .update/version | 6 +++--- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/.conf/dps_114/nginx.nextcloud.conf b/.conf/dps_114/nginx.nextcloud.conf index 2545b3aa24..1f0f734733 100644 --- a/.conf/dps_114/nginx.nextcloud.conf +++ b/.conf/dps_114/nginx.nextcloud.conf @@ -79,7 +79,7 @@ location ^~ /nextcloud { include mime.types; types { - text/javascript js mjs; + text/javascript mjs; application/wasm wasm; } diff --git a/.update/version b/.update/version index ee25551504..2ed96d2b8b 100644 --- a/.update/version +++ b/.update/version @@ -14,6 +14,6 @@ G_MIN_DEBIAN=6 # Alternative Git branch to automatically migrate to when Debian version is too low G_OLD_DEBIAN_BRANCH='8' # Live patches -G_LIVE_PATCH_DESC=() -G_LIVE_PATCH_COND=() -G_LIVE_PATCH=() +G_LIVE_PATCH_DESC=('Fix Nextcloud Nginx config, serving wrong MIME types') +G_LIVE_PATCH_COND=('[[ -f /etc/nginx/sites-dietpi/dietpi-nextcloud.conf ]] && ! grep -q '\''include mime.types;'\'' /etc/nginx/sites-dietpi/dietpi-nextcloud.conf') +G_LIVE_PATCH=('sed -i '\''/types {/i\\tinclude mime.types;'\'' /etc/nginx/sites-dietpi/dietpi-nextcloud.conf; systemctl -q is-active nginx && systemctl restart nginx')