# Session security directives — works with both mod_php and PHP-FPM
<IfModule mod_php.c>
    php_value session.cookie_httponly  1
    php_value session.cookie_samesite  Lax
    php_value session.cookie_secure    1
    php_value session.use_strict_mode  1
</IfModule>
<IfModule mod_php8.c>
    php_value session.cookie_httponly  1
    php_value session.cookie_samesite  Lax
    php_value session.cookie_secure    1
    php_value session.use_strict_mode  1
</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 "no-referrer"
    Header always set Permissions-Policy "camera=(), microphone=(), geolocation=(), payment=()"
    Header always set Content-Security-Policy "default-src 'self'; script-src 'self' 'unsafe-inline'; style-src 'self' 'unsafe-inline'; img-src 'self' data:; connect-src 'self'; frame-ancestors 'none';"
</IfModule>
