From a56a4a19315a19e4c93f8bd7841b8f32cba9fb15 Mon Sep 17 00:00:00 2001 From: Tobias Trabelsi Date: Fri, 2 Feb 2024 21:37:06 +0100 Subject: [PATCH 1/2] added missing mime type Signed-off-by: Tobias Trabelsi --- charts/nextcloud/Chart.yaml | 2 +- charts/nextcloud/templates/nginx-config.yaml | 5 +++++ 2 files changed, 6 insertions(+), 1 deletion(-) diff --git a/charts/nextcloud/Chart.yaml b/charts/nextcloud/Chart.yaml index 3c38f70a..152b2ada 100644 --- a/charts/nextcloud/Chart.yaml +++ b/charts/nextcloud/Chart.yaml @@ -1,6 +1,6 @@ apiVersion: v2 name: nextcloud -version: 4.5.15 +version: 4.5.16 appVersion: 28.0.2 description: A file sharing server that puts the control and security of your own data back into your hands. keywords: diff --git a/charts/nextcloud/templates/nginx-config.yaml b/charts/nextcloud/templates/nginx-config.yaml index 9c48aadd..96ca4bd7 100644 --- a/charts/nextcloud/templates/nginx-config.yaml +++ b/charts/nextcloud/templates/nginx-config.yaml @@ -14,6 +14,11 @@ # could take several months. #add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always; + include mime.types; + types { + application/javascript js mjs; + } + # set max upload size client_max_body_size 10G; fastcgi_buffers 64 4K; From 7c2fc2641372d75537295113af3e826d7a313ad3 Mon Sep 17 00:00:00 2001 From: Tobias Trabelsi Date: Fri, 2 Feb 2024 23:48:43 +0100 Subject: [PATCH 2/2] moved reference to match upstream docs Signed-off-by: Tobias Trabelsi --- charts/nextcloud/templates/nginx-config.yaml | 14 +++++++++----- 1 file changed, 9 insertions(+), 5 deletions(-) diff --git a/charts/nextcloud/templates/nginx-config.yaml b/charts/nextcloud/templates/nginx-config.yaml index 96ca4bd7..aa5326a8 100644 --- a/charts/nextcloud/templates/nginx-config.yaml +++ b/charts/nextcloud/templates/nginx-config.yaml @@ -14,11 +14,6 @@ # could take several months. #add_header Strict-Transport-Security "max-age=15768000; includeSubDomains; preload;" always; - include mime.types; - types { - application/javascript js mjs; - } - # set max upload size client_max_body_size 10G; fastcgi_buffers 64 4K; @@ -47,6 +42,15 @@ # Remove X-Powered-By, which is an information leak fastcgi_hide_header X-Powered-By; + # Add .mjs as a file extension for javascript + # Either include it in the default mime.types list + # or include you can include that list explicitly and add the file extension + # only for Nextcloud like below: + include mime.types; + types { + text/javascript js mjs; + } + # Path to the root of your installation root /var/www/html;