# ============================================================================
# gong.gp — configuration Apache (o2switch / hébergement mutualisé statique).
# Le CSP script-src/style-src est géré par la balise hachée de SvelteKit.
# ============================================================================
# ── HTTPS forcé ──
RewriteEngine On
RewriteCond %{HTTPS} off
RewriteRule ^ https://%{HTTP_HOST}%{REQUEST_URI} [L,R=301]
# ── En-têtes de sécurité ──
Header always set X-Frame-Options "DENY"
Header always set X-Content-Type-Options "nosniff"
Header always set Referrer-Policy "strict-origin-when-cross-origin"
Header always set Permissions-Policy "geolocation=(), camera=(), microphone=(), payment=(), usb=(), interest-cohort=()"
Header always set Strict-Transport-Security "max-age=31536000; includeSubDomains; preload"
Header always set Content-Security-Policy "frame-ancestors 'none'; base-uri 'self'; form-action 'self'; object-src 'none'"
# ── Cache : assets immuables ──
Header set Cache-Control "public, max-age=31536000, immutable"
ExpiresActive On
ExpiresByType text/css "access plus 1 year"
ExpiresByType application/javascript "access plus 1 year"
ExpiresByType font/woff2 "access plus 1 year"
ExpiresByType image/avif "access plus 1 year"
ExpiresByType image/webp "access plus 1 year"
ExpiresByType text/html "access plus 0 seconds"
# ── Compression ──
AddOutputFilterByType DEFLATE text/html text/css application/javascript application/json image/svg+xml application/xml
# ── Page 404 autonome ──
ErrorDocument 404 /404.html
# ── Types ──
AddType application/manifest+json .webmanifest
AddType font/woff2 .woff2
AddType image/avif .avif