# Cloudflare Pages headers — generated by scripts/build-site.mjs
/*
  Content-Security-Policy: default-src 'self'; script-src 'self' 'wasm-unsafe-eval' https://accounts.google.com/gsi/client https://static.cloudflareinsights.com https://cdn.portone.io https://t1.kakaocdn.net https://*.portone.io https://*.iamport.co https://*.iamport.kr https://*.kcp.co.kr https://www.paypal.com https://*.paypal.com; worker-src 'self' blob:; connect-src 'self' blob: data: https://api.nobami.com wss://api.nobami.com https://accounts.google.com https://cloudflareinsights.com https://workbami.com https://work.nobami.com https://api.anthropic.com https://api.openai.com https://generativelanguage.googleapis.com https://openrouter.ai https://api.groq.com https://api.deepseek.com https://api.mistral.ai https://api.upstage.ai https://api.together.xyz https://api.x.ai https://api.perplexity.ai https://cdn.jsdelivr.net https://huggingface.co https://*.huggingface.co https://*.hf.co https://*.portone.io https://*.iamport.co https://*.iamport.kr https://*.kcp.co.kr https://www.paypal.com https://*.paypal.com https://kapi.kakao.com https://sharer.kakao.com http://localhost:* http://127.0.0.1:*; img-src 'self' data: blob: https:; media-src 'self' data: blob:; style-src 'self' 'unsafe-inline' https://accounts.google.com/gsi/style; font-src 'self' data: https://cdn.jsdelivr.net; frame-src 'self' blob: https://www.youtube-nocookie.com https://accounts.google.com https://sharer.kakao.com https://*.portone.io https://*.iamport.co https://*.iamport.kr https://*.kcp.co.kr https://www.paypal.com https://*.paypal.com; object-src 'none'; base-uri 'self'; form-action 'self' https://*.portone.io https://*.iamport.co https://*.iamport.kr https://*.kcp.co.kr https://www.paypal.com https://*.paypal.com; manifest-src 'self'; frame-ancestors 'none'
  Strict-Transport-Security: max-age=63072000; includeSubDomains; preload
  X-Content-Type-Options: nosniff
  X-Frame-Options: DENY
  Referrer-Policy: strict-origin-when-cross-origin
  Permissions-Policy: camera=(self), microphone=(self), geolocation=(), payment=(self), usb=(), serial=(), hid=(), midi=(), magnetometer=(), gyroscope=(), accelerometer=(), display-capture=(), idle-detection=(), xr-spatial-tracking=(), browsing-topics=(), attribution-reporting=(), join-ad-interest-group=(), run-ad-auction=(), private-state-token-issuance=(), private-state-token-redemption=(), otp-credentials=(), window-management=(), clipboard-write=(self), clipboard-read=(self), fullscreen=(self), screen-wake-lock=(self), local-fonts=(self), publickey-credentials-get=(self), identity-credentials-get=(self "https://accounts.google.com"), picture-in-picture=(self), autoplay=(self), encrypted-media=(self)
  Cross-Origin-Opener-Policy: same-origin-allow-popups
  Cross-Origin-Resource-Policy: same-site
  X-Permitted-Cross-Domain-Policies: none
  X-DNS-Prefetch-Control: off

/app/assets/*
  Cache-Control: public, max-age=31536000, immutable

# The editor app's page: Workbami opens it in a window and hands it a file by postMessage (?import=workbami,
# app/family/workbamiImport.ts). same-origin-allow-popups would cut that window off from its opener (window.opener =
# null), so the app page itself uses unsafe-none; the site pages keep same-origin-allow-popups.
/app/
  ! Cross-Origin-Opener-Policy
  Cross-Origin-Opener-Policy: unsafe-none

/app/index.html
  ! Cross-Origin-Opener-Policy
  Cross-Origin-Opener-Policy: unsafe-none

# Extension sandbox host page: framed by the app (sandbox="allow-scripts", opaque origin). It gets its own CSP; the
# per-extension policy is added by the page (<meta>) and, in Chromium, required via the iframe csp attribute.
/app/ext-sandbox/*
  ! Content-Security-Policy
  ! X-Frame-Options
  Content-Security-Policy: default-src 'none'; script-src 'self' 'unsafe-inline' 'unsafe-eval' https: blob: data:; style-src 'self' 'unsafe-inline' https: data:; img-src 'self' data: blob: https:; font-src 'self' data: https:; media-src 'self' data: blob: https:; connect-src 'self' https: wss:; worker-src blob:; frame-src 'none'; object-src 'none'; form-action 'none'; base-uri 'self' https:; frame-ancestors 'self'
  Allow-CSP-From: *
  Cache-Control: no-cache

# Bundled extensions are fetched by the opaque-origin sandbox (cross-site): CORS + CORP must allow it.
/app/extensions/*
  ! Cross-Origin-Resource-Policy
  Cross-Origin-Resource-Policy: cross-origin
  Cache-Control: no-cache
  Access-Control-Allow-Origin: *

/site.*.js
  Cache-Control: public, max-age=31536000, immutable

/app/sw.js
  Cache-Control: no-cache

/app/manifest.webmanifest
  Content-Type: application/manifest+json
  Cache-Control: public, max-age=3600

/icons/*
  ! Cross-Origin-Resource-Policy
  Cross-Origin-Resource-Policy: cross-origin
  Cache-Control: public, max-age=604800

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

/og/*
  ! Cross-Origin-Resource-Policy
  Cross-Origin-Resource-Policy: cross-origin
  Cache-Control: public, max-age=86400

/.well-known/security.txt
  Content-Type: text/plain; charset=utf-8

/llms.txt
  Content-Type: text/plain; charset=utf-8

# Nobami for AI agent packages: fetched by agents and CLIs from anywhere.
/ai/*
  ! Cross-Origin-Resource-Policy
  Cross-Origin-Resource-Policy: cross-origin
  Access-Control-Allow-Origin: *
  Cache-Control: public, max-age=3600

/ai/*.md
  Content-Type: text/markdown; charset=utf-8

/ai/*.txt
  Content-Type: text/plain; charset=utf-8

/ai/*.zip
  Content-Type: application/zip
