# Required for SharedArrayBuffer — needed by LiveKit E2EE frame encryption.
# Without COOP+COEP, the LiveKit E2EE web worker cannot be created.
<IfModule mod_headers.c>
  Header set Cross-Origin-Opener-Policy "same-origin"
  Header set Cross-Origin-Embedder-Policy "require-corp"
</IfModule>

# Flutter HTML5 routing — all unknown paths serve index.html
Options -Indexes
RewriteEngine On

RewriteCond %{REQUEST_FILENAME} !-f
RewriteCond %{REQUEST_FILENAME} !-d

RewriteRule ^(.*)$ /index.html [L,QSA]
