Options -Indexes
DirectoryIndex index.php

<IfModule mod_rewrite.c>
RewriteEngine On
RewriteRule "(^|/)\.(?!well-known/)" - [F,L]
</IfModule>

<FilesMatch "^(composer\.(json|lock)|README.*|.*\.sql|.*\.log)$">
    Require all denied
</FilesMatch>

<IfModule mod_headers.c>
    Header always set X-Content-Type-Options "nosniff"
    Header always set X-Frame-Options "SAMEORIGIN"
    Header always set Referrer-Policy "strict-origin-when-cross-origin"
    Header always set Permissions-Policy "camera=(), microphone=(), geolocation=(), payment=()"
    <FilesMatch "^(sw\.js)$">
        Header set Cache-Control "no-store, no-cache, must-revalidate, max-age=0"
    </FilesMatch>
    <FilesMatch "\.(css|js|webp|png|jpe?g|gif|svg|ico|webmanifest)$">
        Header set Cache-Control "public, max-age=604800"
    </FilesMatch>
</IfModule>

<IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/html text/plain text/css application/javascript application/json image/svg+xml
</IfModule>
