Options -Indexes
DirectoryIndex index.php

<FilesMatch "^(VERSION|composer\.json|FILES\.sha256)$">
  Require all denied
</FilesMatch>

# Compress text assets and JSON responses. Safe on shared cPanel hosts where
# mod_deflate or mod_brotli may be enabled independently.
<IfModule mod_brotli.c>
  AddOutputFilterByType BROTLI_COMPRESS text/html text/plain text/css text/javascript application/javascript application/json application/manifest+json image/svg+xml
</IfModule>
<IfModule mod_deflate.c>
  AddOutputFilterByType DEFLATE text/html text/plain text/css text/javascript application/javascript application/json application/manifest+json image/svg+xml
</IfModule>

# Versioned static assets are immutable. index.php and API responses keep their
# own PHP cache headers, so application data is never cached here.
<IfModule mod_expires.c>
  ExpiresActive On
  ExpiresByType text/css "access plus 1 year"
  ExpiresByType application/javascript "access plus 1 year"
  ExpiresByType text/javascript "access plus 1 year"
  ExpiresByType image/webp "access plus 1 year"
  ExpiresByType image/svg+xml "access plus 1 year"
  ExpiresByType application/manifest+json "access plus 1 day"
</IfModule>
<IfModule mod_headers.c>
  <FilesMatch "\.(?:css|js|webp|svg)$">
    Header set Cache-Control "public, max-age=31536000, immutable"
  </FilesMatch>
  <FilesMatch "\.webmanifest$">
    Header set Cache-Control "public, max-age=86400"
  </FilesMatch>
  Header always set X-Content-Type-Options "nosniff"
</IfModule>

FileETag MTime Size
