summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2013-10-13 13:46:35 +0200
committerGravatar Alexandre Alapetite <alexandre@alapetite.fr> 2013-10-13 13:46:52 +0200
commit583f494bb7f3ba8c1cc3c6b7dec339a64da62b91 (patch)
tree1fccd85c923bc801fbf143ba3e73f62650e5c5ef
parent858825e49acfc4c484b379504125d0cf98122620 (diff)
Propose un .htaccess par défaut
Une bonne amélioration des performances est possible en utilisant le cache HTTP. Ce patch propose un .htaccess par défaut (pour Apache). L'accès "Satisfy Any" pour favicon.ico est pour le cas où le répertoire FreshRSS serait protégé par un mot de passe, ce qui pose problèmes pour certaines utilisations de favicon (y compris dans Firefox). Le "Cache-Control public" est surtout utile pour la mise en cache dans le cas de HTTPS.
-rw-r--r--public/.htaccess40
1 files changed, 40 insertions, 0 deletions
diff --git a/public/.htaccess b/public/.htaccess
new file mode 100644
index 000000000..10fb21f70
--- /dev/null
+++ b/public/.htaccess
@@ -0,0 +1,40 @@
+<IfModule mod_dir.c>
+ DirectoryIndex index.php index.html
+</IfModule>
+
+FileETag None
+AddDefaultCharset UTF-8
+
+<IfModule mod_mime.c>
+ AddCharset UTF-8 .css
+ AddCharset UTF-8 .js
+ AddCharset UTF-8 .svg
+ AddType application/font-woff .woff
+</IfModule>
+
+<IfModule mod_expires.c>
+ ExpiresActive on
+ ExpiresByType application/font-woff access plus 1 year
+ ExpiresByType application/javascript access plus 1 week
+ ExpiresByType image/gif access plus 1 month
+ ExpiresByType image/png access plus 1 month
+ ExpiresByType image/svg+xml access plus 1 month
+ ExpiresByType image/x-icon access plus 1 year
+ ExpiresByType text/css access plus 1 week
+ ExpiresByType text/javascript access plus 1 week
+ <FilesMatch "\.php$">
+ ExpiresActive Off
+ </FilesMatch>
+</IfModule>
+
+<IfModule mod_headers.c>
+ <FilesMatch "\.(css|ico|gif|png|woff)$">
+ Header merge Cache-Control "public"
+ </FilesMatch>
+</IfModule>
+
+<Files "favicon.ico">
+ Order Deny,Allow
+ Allow from all
+ Satisfy Any
+</Files>