# ==============================================================================
# TITAN POS ENGINE - HARDENED APACHE SERVER CONFIGURATION
# ==============================================================================

# Disable Directory Browsing
Options -Indexes

# Follow Symbolic Links
Options +FollowSymLinks

# Block Access to Hidden & Sensitive Files (.env, .git, .sql, .log, .gz)
<FilesMatch "^\.|\.(env|log|sql|gz|sh|bak|config)$">
    Order allow,deny
    Deny from all
</FilesMatch>

# Prevent Direct Access to Backups & Logs directories
RedirectMatch 403 ^/(backups|logs)/.*$

# Enforce UTF-8 Default Charset
AddDefaultCharset UTF-8

# Secure HTTP Headers (cPanel Apache Module compatibility)
<IfModule mod_headers.c>
    Header set X-Content-Type-Options "nosniff"
    Header set X-Frame-Options "SAMEORIGIN"
    Header set X-XSS-Protection "1; mode=block"
    Header set Referrer-Policy "strict-origin-when-cross-origin"
</IfModule>

# Enable Gzip Compression for Fast Retail Terminal Delivery
<IfModule mod_deflate.c>
    AddOutputFilterByType DEFLATE text/plain text/html text/xml text/css application/xml application/xhtml+xml application/rss+xml application/javascript application/x-javascript application/json
</IfModule>
