# engage.ramphearth.com — the website chat box (docs/ENGAGE_PLAN.md Part 2), served by the Cloudflare Worker in
# deploy/engage-site/ (static assets only).
#
# Anyone on the internet opens these pages, so the policy is the strictest we have: our own origin and the API, no
# third-party origin of any kind (no analytics, fonts, captcha or frames), no inline script, no eval.
#  connect-src    the API only (credentials omitted on every call). The API allows this origin from ENGAGE_PUBLIC_URL,
#                 uncredentialed and on /public/engage/site/ only — never put it in ALLOWED_ORIGINS.
#  worker-src     'self': the proof-of-work solver runs in a same-origin Web Worker (no blob: workers).
#  img-src        data:/blob: for inline marks; the brand logo comes from the API.
#  style-src      'unsafe-inline': React style props (the brand accent).
#  frame-ancestors 'none' everywhere except /chat/* (the chat box a workspace puts on its own website through
#                 /embed.js, so any site may frame it). The app's own origin keeps 'none' on /engage/ — framing needs
#                 this site.
#  /embed.js      the one script a workspace's website loads: cross-origin, no cookies, so CORP cross-origin.
/*
  Content-Security-Policy: default-src 'self'; script-src 'self'; worker-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' https://api.ramphearth.com data: blob:; connect-src https://api.ramphearth.com; font-src 'self' data:; object-src 'none'; base-uri 'self'; form-action 'self'; frame-ancestors 'none'
  Strict-Transport-Security: max-age=31536000; includeSubDomains
  X-Content-Type-Options: nosniff
  Referrer-Policy: no-referrer
  X-Frame-Options: DENY
  Permissions-Policy: microphone=(), camera=(), display-capture=(), fullscreen=(self), autoplay=(), geolocation=(), payment=(), usb=(), serial=(), hid=(), bluetooth=(), midi=(), magnetometer=(), gyroscope=(), accelerometer=(), browsing-topics=()
  X-Robots-Tag: noindex
/chat/*
  ! Content-Security-Policy
  ! X-Frame-Options
  Content-Security-Policy: default-src 'self'; script-src 'self'; worker-src 'self'; style-src 'self' 'unsafe-inline'; img-src 'self' https://api.ramphearth.com data: blob:; connect-src https://api.ramphearth.com; font-src 'self' data:; object-src 'none'; base-uri 'self'; form-action 'self'; frame-ancestors *
/embed.js
  Cross-Origin-Resource-Policy: cross-origin
  Cache-Control: public, max-age=300
/assets/*
  Cache-Control: public, max-age=31536000, immutable
