diff options
author | Joas Schilling <213943+nickvergessen@users.noreply.github.com> | 2021-11-17 15:09:21 +0100 |
---|---|---|
committer | GitHub <noreply@github.com> | 2021-11-17 15:09:21 +0100 |
commit | e272ac258ae3a14dd27335e03c7eab1fae355b7b (patch) | |
tree | 32cd1ae9186165e11eedd8083f9537f6535082d4 | |
parent | c833a4bfec0c03194e0abc1c0463ca27d6c2bd3c (diff) | |
parent | 24bc96ad095ea2d5650be8827eee641a32ca3c54 (diff) | |
download | nextcloud-server-e272ac258ae3a14dd27335e03c7eab1fae355b7b.tar.gz nextcloud-server-e272ac258ae3a14dd27335e03c7eab1fae355b7b.zip |
Merge pull request #29747 from nextcloud/allow-to-serve-static-webassembly-and-tensorflow-lite-files
Allow to serve static WebAssembly and TensorFlow Lite files
-rw-r--r-- | .htaccess | 3 | ||||
-rw-r--r-- | lib/private/Setup.php | 2 |
2 files changed, 3 insertions, 2 deletions
diff --git a/.htaccess b/.htaccess index 4986f7d380f..ce84f0698c7 100644 --- a/.htaccess +++ b/.htaccess @@ -43,7 +43,7 @@ </IfModule> # Add cache control for static resources - <FilesMatch "\.(css|js|svg|gif|png|jpg|ico)$"> + <FilesMatch "\.(css|js|svg|gif|png|jpg|ico|wasm|tflite)$"> Header set Cache-Control "max-age=15778463" </FilesMatch> @@ -75,6 +75,7 @@ <IfModule mod_mime.c> AddType image/svg+xml svg svgz + AddType application/wasm wasm AddEncoding gzip svgz </IfModule> diff --git a/lib/private/Setup.php b/lib/private/Setup.php index a7f0f190fa2..f1ad04671f9 100644 --- a/lib/private/Setup.php +++ b/lib/private/Setup.php @@ -530,7 +530,7 @@ class Setup { $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)$"; + $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} !/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"; |