# ==========================================
#   سرباز سلام - تنظیمات امنیتی
# ==========================================

# مسدود کردن دسترسی مستقیم به فولدرها
Options -Indexes

# فقط webhook.php و setup_webhook.php قابل دسترسی باشن
<FilesMatch "^(?!webhook\.php|setup_webhook\.php).*\.php$">
    <IfModule mod_authz_core.c>
        Require all denied
    </IfModule>
    <IfModule !mod_authz_core.c>
        Order deny,allow
        Deny from all
    </IfModule>
</FilesMatch>

# مسدود کردن دسترسی به فولدر data
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteRule ^data/ - [F,L]
    RewriteRule ^config/ - [F,L]
    RewriteRule ^handlers/ - [F,L]
    RewriteRule ^utils/ - [F,L]
</IfModule>

# هدرهای امنیتی
<IfModule mod_headers.c>
    Header always set X-Content-Type-Options nosniff
    Header always set X-Frame-Options DENY
</IfModule>
