mirror of
https://github.com/Ark0N/Codeman.git
synced 2026-11-14 02:29:33 +01:00
A sandboxed page is opaque-origin, so a fetch() of its own data file with a non-safelisted header preflights with `Origin: null`. The auth hook refused the OPTIONS (the html-view exemption admitted GET and HEAD only) and, without a password, the security-headers hook answered a bare 204 with no Access-Control-Allow-Origin, so the fetch failed either way. The exemption now admits OPTIONS for a live capability, and registerSecurityHeaders answers it itself with Allow-Origin `*`, Allow-Methods `GET, HEAD` and Allow-Headers `*` (no credentials are involved). An unknown or revoked capability still gets the 401, and writes on the capability path are still refused. Co-Authored-By: Claude Opus 5.5 (1M context) <noreply@anthropic.com>