/*
  X-Content-Type-Options: nosniff
  Referrer-Policy: strict-origin-when-cross-origin
  X-Frame-Options: DENY
  Permissions-Policy: camera=(), microphone=(), geolocation=()
  Strict-Transport-Security: max-age=31536000; includeSubDomains
  Content-Security-Policy: default-src 'self'; img-src 'self' data: https://*.google-analytics.com https://*.analytics.google.com https://*.googletagmanager.com; style-src 'self'; script-src 'self' 'unsafe-inline' https://www.googletagmanager.com; connect-src 'self' https://*.google-analytics.com https://*.analytics.google.com https://*.googletagmanager.com; base-uri 'none'; form-action 'none'; frame-ancestors 'none'

# The Pages project's own addresses serve the same pages as documeow.ai: search engines are told to leave them out.
https://documeow-site.pages.dev/*
  X-Robots-Tag: noindex

https://:version.documeow-site.pages.dev/*
  X-Robots-Tag: noindex

/assets/*
  Cache-Control: public, max-age=604800
  Cross-Origin-Resource-Policy: same-origin

# The stylesheet: checked with the server on every use (pages also link it as /styles.css?v=<content hash>).
/styles.css
  Cache-Control: no-cache

# The prompt for AI assistants (site-src/agent.md): plain text, so a browser shows it instead of saving it; always the
# current one.
/agent.md
  Content-Type: text/plain; charset=utf-8
  Cache-Control: no-cache

# Web app (docs/web-cli.md): its own CSP (API + R2 presigned URLs, reader iframe, pdf.js worker and wasm decoders),
# cross-origin isolation (COOP/COEP for SharedArrayBuffer multi-threaded ORT WASM), and the microphone for itself
# (dictation, recording a review; the site-wide rule turns it off).
# "! Name" detaches the site-wide header from the /* rule before the app's own value is set.
/app/*
  ! Content-Security-Policy
  ! X-Frame-Options
  ! Permissions-Policy
  Permissions-Policy: camera=(), microphone=(self), geolocation=()
  Cross-Origin-Opener-Policy: same-origin
  Cross-Origin-Embedder-Policy: require-corp
  Content-Security-Policy: default-src 'self'; script-src 'self' 'wasm-unsafe-eval'; style-src 'self' 'unsafe-inline' blob:; img-src 'self' blob: data:; font-src 'self' data: blob:; media-src 'self' blob: data:; connect-src 'self' blob: data: https://api.documeow.ai https://*.r2.cloudflarestorage.com; frame-src 'self' blob:; worker-src 'self' blob:; object-src 'none'; base-uri 'none'; form-action 'none'; frame-ancestors 'self'
  X-Frame-Options: SAMEORIGIN

/app/
  Cache-Control: no-cache

/app/index.html
  Cache-Control: no-cache

# Public Voice Lab (/lab/ and localized /<lang>/lab/): Mode 1 pre-rendered clip auditioning (zero ONNX exposure), optional voice hint recording (microphone=(self)), public report submission, and optional Turnstile.
/lab/*
  ! Content-Security-Policy
  ! Permissions-Policy
  Permissions-Policy: camera=(), microphone=(self), geolocation=()
  Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-inline' https://challenges.cloudflare.com https://www.googletagmanager.com; style-src 'self'; img-src 'self' data: https://*.google-analytics.com https://*.analytics.google.com https://*.googletagmanager.com; media-src 'self' blob: data: https:; connect-src 'self' https://api.documeow.ai https://*.r2.cloudflarestorage.com https://*.google-analytics.com https://*.analytics.google.com https://*.googletagmanager.com https:; frame-src https://challenges.cloudflare.com; base-uri 'none'; form-action 'none'; frame-ancestors 'none'

/:lang/lab/*
  ! Content-Security-Policy
  ! Permissions-Policy
  Permissions-Policy: camera=(), microphone=(self), geolocation=()
  Content-Security-Policy: default-src 'self'; script-src 'self' 'unsafe-inline' https://challenges.cloudflare.com https://www.googletagmanager.com; style-src 'self'; img-src 'self' data: https://*.google-analytics.com https://*.analytics.google.com https://*.googletagmanager.com; media-src 'self' blob: data: https:; connect-src 'self' https://api.documeow.ai https://*.r2.cloudflarestorage.com https://*.google-analytics.com https://*.analytics.google.com https://*.googletagmanager.com https:; frame-src https://challenges.cloudflare.com; base-uri 'none'; form-action 'none'; frame-ancestors 'none'

/lab/
  Cache-Control: no-cache

/lab/index.html
  Cache-Control: no-cache

/:lang/lab/
  Cache-Control: no-cache

/:lang/lab/index.html
  Cache-Control: no-cache
