From 5ab0bcd5bfdcfcf0b8f0b59bed5e9c0f622f840f Mon Sep 17 00:00:00 2001 From: "Dustin C. Hatch" Date: Sun, 13 Oct 2024 18:35:01 -0500 Subject: [PATCH] r/nextcloud: Update rewrite config for .mjs files Nextcloud 28+ uses JavaScript modules (`.mjs` files). These need to be served from the filesystem like other static files, so the *mod_rewrite* configuration needs to be updated as such. --- roles/nextcloud/templates/nextcloud.httpd.conf.j2 | 2 +- 1 file changed, 1 insertion(+), 1 deletion(-) diff --git a/roles/nextcloud/templates/nextcloud.httpd.conf.j2 b/roles/nextcloud/templates/nextcloud.httpd.conf.j2 index e884543..d66f835 100644 --- a/roles/nextcloud/templates/nextcloud.httpd.conf.j2 +++ b/roles/nextcloud/templates/nextcloud.httpd.conf.j2 @@ -21,7 +21,7 @@ Dav off Options -MultiViews RewriteRule ^core/js/oc.js$ index.php [PT,E=PATH_INFO:$1] RewriteRule ^core/preview.png$ index.php [PT,E=PATH_INFO:$1] - RewriteCond %{REQUEST_FILENAME} !\.(css|js|svg|gif|png|html|ttf|woff2?|ico|jpg|jpeg|map|webm|mp4)$ + RewriteCond %{REQUEST_FILENAME} !\.(css|js|mjs|svg|gif|png|html|ttf|woff2?|ico|jpg|jpeg|map|webm|mp4)$ RewriteCond %{REQUEST_FILENAME} !core/img/favicon.ico$ RewriteCond %{REQUEST_FILENAME} !core/img/manifest.json$ RewriteCond %{REQUEST_FILENAME} !/remote.php