# FortiGate Dashboard — Security .htaccess

# Block direct access to config.php and install.php
<FilesMatch "^(config|install)\.php$">
    Order Allow,Deny
    Deny from all
</FilesMatch>

# Block access to api/ directory listing
Options -Indexes

# Security headers
<IfModule mod_headers.c>
    Header always set X-Content-Type-Options "nosniff"
    Header always set X-Frame-Options "SAMEORIGIN"
    Header always set X-XSS-Protection "1; mode=block"
    Header always set Referrer-Policy "strict-origin-when-cross-origin"
</IfModule>

# Redirect all to HTTPS (aktifkan jika SSL tersedia)
# RewriteEngine On
# RewriteCond %{HTTPS} off
# RewriteRule ^(.*)$ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
