# Transmet l'en-tête Authorization à PHP (nécessaire pour les jetons)
SetEnvIf Authorization "(.*)" HTTP_AUTHORIZATION=$1
<IfModule mod_rewrite.c>
  RewriteEngine On
  RewriteCond %{HTTP:Authorization} .
  RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]
</IfModule>

# Empêche le téléchargement direct des fichiers sensibles
<FilesMatch "^(config\.php|config\.sample\.php|db\.php|_guard\.php)$">
  Require all denied
</FilesMatch>
