# En muchos hostings Apache/PHP-FPM compartidos, el header Authorization se
# descarta antes de llegar a PHP (getallheaders() lo ve vacío) a menos que se
# reenvíe explícitamente así. Sin esto, ADMIN_TOKEN fallaría en silencio.
RewriteEngine On
RewriteCond %{HTTP:Authorization} ^(.*)
RewriteRule .* - [E=HTTP_AUTHORIZATION:%1]

# Nunca sirvas config.php ni schema.sql como archivo descargable (defensivo:
# normalmente Apache ejecuta el .php en vez de mostrarlo, pero por si acaso).
<FilesMatch "^(config\.php|schema\.sql)$">
    <IfModule mod_authz_core.c>
        Require all denied
    </IfModule>
    <IfModule !mod_authz_core.c>
        Order allow,deny
        Deny from all
    </IfModule>
</FilesMatch>
