summaryrefslogtreecommitdiffstats
path: root/.htaccess
diff options
context:
space:
mode:
Diffstat (limited to '.htaccess')
-rw-r--r--.htaccess11
1 files changed, 6 insertions, 5 deletions
diff --git a/.htaccess b/.htaccess
index dd0fce231e8..956e29ea7c4 100644
--- a/.htaccess
+++ b/.htaccess
@@ -41,11 +41,12 @@
# Add cache control for static resources
<FilesMatch "\.(css|js|svg|gif|png|jpg|ico|wasm|tflite)$">
- Header set Cache-Control "max-age=15778463"
- </FilesMatch>
-
- <FilesMatch "\.(css|js|svg|gif|png|jpg|ico|wasm|tflite)(\?v=.*)?$">
- Header set Cache-Control "max-age=15778463, immutable"
+ <If "%{QUERY_STRING} =~ /(^|&)v=/">
+ Header set Cache-Control "max-age=15778463, immutable"
+ </If>
+ <Else>
+ Header set Cache-Control "max-age=15778463"
+ </Else>
</FilesMatch>
# Let browsers cache WOFF files for a week