# Cloudflare Workers static-asset headers: files in dist/, served directly or
# fetched by the Worker through env.ASSETS (the app shell). Responses the Worker
# builds itself set their own — JSON and /img in worker/http.ts, the
# verification page (its own CSP with a nonce) in worker/gate-page.ts.
# HSTS and X-Content-Type-Options are already sent by the zone.
#
# CSP: everything is same-origin (/data/pack catalog, /img covers). The only third
# parties are the Cloudflare Web Analytics beacon, which the zone injects into
# every HTML response, and Turnstile (the Suggest form).
# style-src needs 'unsafe-inline' (Radix and Recharts set inline styles at runtime).
/*
  Referrer-Policy: strict-origin-when-cross-origin
  X-Frame-Options: DENY
  Cross-Origin-Opener-Policy: same-origin
  Permissions-Policy: camera=(), microphone=(), geolocation=(), payment=(), usb=()
  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'; connect-src 'self' https://cloudflareinsights.com; frame-src https://challenges.cloudflare.com; manifest-src 'self'; worker-src 'self'; object-src 'none'; base-uri 'self'; form-action 'self'; frame-ancestors 'none'

# Hashed build output never changes under the same name.
/assets/*
  Cache-Control: public, max-age=31536000, immutable

# Catalog: open to the desktop / Android apps. A header set by two matching
# rules is joined with a comma, so each path gets one Cache-Control only.
/data/*
  Access-Control-Allow-Origin: *

# The pack manifest (and the readable JSON the Worker passes to apps 4.0–4.1.1):
# short TTL + background revalidation.
/data/*.json
  Cache-Control: public, max-age=60, stale-while-revalidate=600

# Packs are named after a hash of their bytes: they never change under a name.
/data/pack/*.bin
  Cache-Control: public, max-age=31536000, immutable

/og.*
  Cache-Control: public, max-age=86400

/icon-*
  Cache-Control: public, max-age=604800

/favicon.svg
  Cache-Control: public, max-age=604800

/manifest.webmanifest
  Cache-Control: public, max-age=86400

/.well-known/security.txt
  Cache-Control: public, max-age=86400
