# /sim/ may be embedded by other sites (#/embed/CODE in an <iframe>). The root .htaccess sends X-Frame-Options: SAMEORIGIN for
# the whole shop; for /sim/ only, drop it and allow any frame ancestor. The app itself refuses to render anything but the
# embed player inside a foreign frame (src/collab/frameGuard.ts), so clickjacking of share / reset / teacher screens is closed
# on the client. Apache merges this file after the root one, so the unset/append below act on the root's headers.
<IfModule mod_headers.c>
  Header always unset X-Frame-Options
  Header unset X-Frame-Options
  Header always edit Content-Security-Policy "frame-ancestors[^;]*;?" ""
  Header always append Content-Security-Policy "frame-ancestors *"
  # /sim/classroom/ and /sim/help/ play our own explainer videos (click-to-play): allow only the youtube-nocookie player.
  Header always edit Content-Security-Policy "frame-src " "frame-src https://www.youtube-nocookie.com "
  # User-selected MCP servers connect directly; no Tekko relay. Applies only under /sim/.
  Header always edit Content-Security-Policy "connect-src [^;]+" "connect-src 'self' https: wss: http://localhost:* http://127.0.0.1:* ws://localhost:* ws://127.0.0.1:*"
</IfModule>
