# Response headers for static assets (Cloudflare Workers Static Assets).
# API responses from worker/ set their own headers.
#
# CSP notes:
#  - script-src: the Cloudflare Web Analytics beacon and the Turnstile widget.
#  - style-src 'unsafe-inline': CodeMirror, Radix and Sonner inject styles at runtime.
#  - connect-src: the analytics beacon reports to cloudflareinsights.com (or /cdn-cgi/rum).
#  - frame-src: the Turnstile challenge iframe.
#  - worker-src 'self': the conversion Web Worker.
/*
  Content-Security-Policy: default-src 'self'; script-src 'self' https://static.cloudflareinsights.com https://challenges.cloudflare.com; style-src 'self' 'unsafe-inline'; img-src 'self' data:; font-src 'self' data:; connect-src 'self' https://cloudflareinsights.com; frame-src https://challenges.cloudflare.com; worker-src 'self'; manifest-src 'self'; object-src 'none'; base-uri 'self'; form-action 'self'; frame-ancestors 'none'; upgrade-insecure-requests
  Strict-Transport-Security: max-age=31536000
  X-Content-Type-Options: nosniff
  X-Frame-Options: DENY
  Referrer-Policy: strict-origin-when-cross-origin
  Permissions-Policy: accelerometer=(), camera=(), geolocation=(), gyroscope=(), magnetometer=(), microphone=(), payment=(), usb=(), browsing-topics=()
  Cross-Origin-Opener-Policy: same-origin
  # HTML must revalidate so a deploy is picked up; no-transform keeps zone
  # features (Rocket Loader, Email Obfuscation) from rewriting pages and
  # breaking the CSP.
  Cache-Control: no-cache, no-transform

# Vite's hashed bundles never change content under the same name.
/assets/*
  ! Cache-Control
  Cache-Control: public, max-age=31536000, immutable
