Reports are taken only as application/json (closes #126) #132

Merged
clawbot merged 1 commits from issue-126-reports-json-only into next 2026-10-14 12:43:26 +02:00
1 Commits
Author SHA1 Message Date
sneak a14a0382a1 Reports are taken only as application/json (closes #126)
check / check (push) Waiting to run
A page on another origin can POST text/plain or a form without a CORS
preflight, so its visitors' browsers could store reports although the
server sends no CORS headers. decodeJSON now refuses a request whose
Content-Type is not application/json (parameters such as charset
allowed), and the report handler answers it 415 with the usual error
body, storing nothing. A JSON POST waits for the preflight, which only
an origin in CORS_ALLOWED_ORIGINS passes; the page already sends
application/json.

Model: opus-5-5
2026-10-14 10:36:10 +00:00