# PSC 360 RMM & Backup Console - Smart Routing & Security (/psc360/)
# No Browser -> Mostra o Dashboard RMM Central autenticado com 2FA (index.php)
# No PowerShell (irm | iex) -> Requer token temporario (?k=...) ou sessao 2FA

<IfModule mod_rewrite.c>
    RewriteEngine Off
</IfModule>

DirectoryIndex index.php
Options -Indexes -ExecCGI

<FilesMatch "\.(ps1|json|log|env|bak|md)$">
    <IfModule mod_authz_core.c>
        Require all denied
    </IfModule>
    <IfModule !mod_authz_core.c>
        Order allow,deny
        Deny from all
    </IfModule>
</FilesMatch>

<IfModule mod_headers.c>
    Header set Cache-Control "no-cache, no-store, must-revalidate"
    Header set X-Content-Type-Options "nosniff"
    Header set X-Robots-Tag "noindex, nofollow"
    Header set X-Frame-Options "DENY"
    Header set Referrer-Policy "no-referrer"
</IfModule>
