<IfModule mod_rewrite.c>
    <IfModule mod_negotiation.c>
        Options -MultiViews -Indexes
    </IfModule>

    RewriteEngine On

    # Handle Authorization Header
    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    # Redirect Trailing Slashes If Not A Folder...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_URI} (.+)/$
    RewriteRule ^ %1 [L,R=301]

    # Send Requests To Front Controller...
    RewriteCond %{REQUEST_FILENAME} !-d
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
</IfModule>

<IfModule mod_headers.c>
    # 1. HSTS Enable (1 Year)
    Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"

    # 2. X-Content-Type-Options
    Header always set X-Content-Type-Options "nosniff"

    # 3. X-Frame-Options (Clickjacking Protection)
    Header always set X-Frame-Options "SAMEORIGIN"

    # 4. Referrer-Policy
    Header always set Referrer-Policy "strict-origin-when-cross-origin"
    
    # 9. Content-Security-Policy (CSP) 
    Header always set Content-Security-Policy-Report-Only "default-src 'self'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https://cdnjs.cloudflare.com; style-src 'self' 'unsafe-inline' https://fonts.googleapis.com https://fonts.bunny.net; font-src 'self' https://fonts.gstatic.com https://fonts.bunny.net; img-src 'self' data: blob: https: https://ui-avatars.com; connect-src 'self' https://fonts.bunny.net https://ui-avatars.com; worker-src https://cdnjs.cloudflare.com 'self' blob:;"
</IfModule>
# php -- BEGIN cPanel-generated handler, do not edit
# Set the “ea-php81” package as the default “PHP” programming language.
<IfModule mime_module>
  AddHandler application/x-httpd-ea-php81 .php .php8 .phtml
</IfModule>
# php -- END cPanel-generated handler, do not edit
