DirectoryIndex index.php index.html

AddDefaultCharset UTF-8
AddCharset UTF-8 .php .html .css .js .json

# Allow public access to the Fluff store pages, even if a parent directory
# defines HTTP Basic Authentication. This does not bypass application-level
# authorization on admin or account pages.
AuthType None
Require all granted

# Compress text assets where the hosting server supports mod_deflate.
<IfModule mod_deflate.c>
  AddOutputFilterByType DEFLATE text/plain text/html text/css text/javascript application/javascript application/json application/xml image/svg+xml
</IfModule>

# Brotli is used automatically where available; otherwise mod_deflate above applies.
<IfModule mod_brotli.c>
  AddOutputFilterByType BROTLI_COMPRESS text/plain text/html text/css text/javascript application/javascript application/json application/xml image/svg+xml
</IfModule>

# Cache versioned/static assets in the browser. Do not cache PHP/HTML checkout pages.
<IfModule mod_expires.c>
  ExpiresActive On
  ExpiresByType text/css "access plus 30 days"
  ExpiresByType application/javascript "access plus 30 days"
  ExpiresByType text/javascript "access plus 30 days"
  ExpiresByType image/jpeg "access plus 30 days"
  ExpiresByType image/png "access plus 30 days"
  ExpiresByType image/gif "access plus 30 days"
  ExpiresByType image/webp "access plus 30 days"
  ExpiresByType image/svg+xml "access plus 30 days"
  ExpiresByType image/x-icon "access plus 30 days"
  ExpiresByType font/woff2 "access plus 1 year"
  ExpiresByType font/woff "access plus 1 year"
</IfModule>

<IfModule mod_headers.c>
  <FilesMatch "\.(css|js|png|jpe?g|gif|webp|svg|ico|woff2?)$">
    Header append Vary Accept-Encoding
  </FilesMatch>
  # Checkout responses are dynamic and must not be shared by browser/proxy caches.
  <FilesMatch "\.(php|html?)$">
    Header set Cache-Control "private, no-store, no-cache, must-revalidate"
  </FilesMatch>
</IfModule>
