From 31d5f720fbacda95484194a60dfbbfd4140f3de8 Mon Sep 17 00:00:00 2001 From: Ferdinand Thiessen Date: Wed, 7 Jun 2023 15:19:44 +0200 Subject: [PATCH] fix(apache): Serve `mjs` (module javascript) as static files Signed-off-by: Ferdinand Thiessen --- .htaccess | 2 +- lib/private/Setup.php | 2 +- 2 files changed, 2 insertions(+), 2 deletions(-) diff --git a/.htaccess b/.htaccess index 54fe8eaf3d0c6..7a8f41886aca9 100644 --- a/.htaccess +++ b/.htaccess @@ -40,7 +40,7 @@ # Add cache control for static resources - + Header set Cache-Control "max-age=15778463, immutable" diff --git a/lib/private/Setup.php b/lib/private/Setup.php index 7567aaf14b1da..3a2e7614dd92e 100644 --- a/lib/private/Setup.php +++ b/lib/private/Setup.php @@ -529,7 +529,7 @@ public static function updateHtaccess() { $content .= "\n Options -MultiViews"; $content .= "\n RewriteRule ^core/js/oc.js$ index.php [PT,E=PATH_INFO:$1]"; $content .= "\n RewriteRule ^core/preview.png$ index.php [PT,E=PATH_INFO:$1]"; - $content .= "\n RewriteCond %{REQUEST_FILENAME} !\\.(css|js|svg|gif|png|html|ttf|woff2?|ico|jpg|jpeg|map|webm|mp4|mp3|ogg|wav|wasm|tflite)$"; + $content .= "\n RewriteCond %{REQUEST_FILENAME} !\\.(css|js|mjs|svg|gif|png|html|ttf|woff2?|ico|jpg|jpeg|map|webm|mp4|mp3|ogg|wav|wasm|tflite)$"; $content .= "\n RewriteCond %{REQUEST_FILENAME} !/core/ajax/update\\.php"; $content .= "\n RewriteCond %{REQUEST_FILENAME} !/core/img/(favicon\\.ico|manifest\\.json)$"; $content .= "\n RewriteCond %{REQUEST_FILENAME} !/(cron|public|remote|status)\\.php";