# Apache: point the virtual host's DocumentRoot at this "public" directory.
Options -Indexes

<IfModule mod_rewrite.c>
    RewriteEngine On

    # Pass the Authorization header through to PHP (needed for Bearer tokens under CGI/FPM).
    RewriteCond %{HTTP:Authorization} .
    RewriteRule .* - [E=HTTP_AUTHORIZATION:%{HTTP:Authorization}]

    # Serve real files directly; route everything else to the front controller.
    RewriteCond %{REQUEST_FILENAME} !-f
    RewriteRule ^ index.php [L]
</IfModule>

# Allow larger attachment uploads (also raise these in php.ini / FPM pool if overridden there).
<IfModule mod_php.c>
    php_value upload_max_filesize 20M
    php_value post_max_size 120M
</IfModule>
