# Force PHP error display off regardless of php.ini (XAMPP defaults to On)
php_flag display_errors Off
php_flag log_errors On

<IfModule mod_rewrite.c>
    RewriteEngine On
    # Serve o sitemap dinâmico no URL canónico /sitemap.xml
    RewriteRule ^sitemap\.xml$ sitemap.php [L]
</IfModule>

<IfModule mod_headers.c>
    Header always set X-Frame-Options "DENY"
    Header always set X-Content-Type-Options "nosniff"
    Header always set Referrer-Policy "strict-origin-when-cross-origin"
    # inline styles/scripts exist throughout the site, so unsafe-inline is required for now
    # Google Fonts loaded from external CDN
    Header always set Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com; font-src 'self' https://fonts.gstatic.com; img-src 'self' data:; frame-ancestors 'none'"
</IfModule>
