# Single-page app fallback for Apache (WAMP / production).
# Serve existing files, send every other path to index.html so client-side routes work on refresh.
<IfModule mod_rewrite.c>
    RewriteEngine On
    RewriteCond %{REQUEST_FILENAME} -f [OR]
    RewriteCond %{REQUEST_FILENAME} -d
    RewriteRule ^ - [L]
    RewriteRule ^ index.html [L]
</IfModule>

<IfModule mod_headers.c>
    # hashed assets can be cached forever; index.html must always be revalidated
    <FilesMatch "\.(js|css|woff2?|png|svg|jpg|webp)$">
        Header set Cache-Control "public, max-age=31536000, immutable"
    </FilesMatch>
    <FilesMatch "index\.html$">
        Header set Cache-Control "no-cache"
    </FilesMatch>
    Header always set X-Content-Type-Options "nosniff"
    Header always set Referrer-Policy "strict-origin-when-cross-origin"
    Header always set X-Frame-Options "DENY"
</IfModule>
