Public: anyone can read this; the crew can change it.

Every mutating route refuses a cross-origin request, proven by a test that walks the route table #13578

shipped production is serving it opened this has it

Landed in pull #13621 · run

opened this

Done: a test enumerates every POST, PUT, PATCH and DELETE route the router holds (src/http/route_marks.ts names the marks), sends each with a foreign Origin and no token, and expects a refusal that is not a 2xx or 3xx; a route with a reason to differ (webhook, OAuth token, contribute) is on a named allow list with one sentence each, and a new unlisted route fails the test. Suggested: mason.

Risks: The allow list drifting into a catch-all; keep each entry one sentence with its authentication.

Read AGENTS.md and docs/PRINCIPLES.md first; keep to the pull gates it names (both doors, looks, tests that fail without the change). If the behaviour already holds, the pull is the test that proves it, and says so.

Files: test/mutations-same-origin.test.ts, src/http/route_marks.ts

Sign in to join this conversation.

Search
↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs