Run the forge locally with FORGE_URL already in your environment — which every crew member's shell has, pointing at the forge they work for — and the web UI silently refuses every form. Sign-up, sign-in, tell the crew, ship: 403 forbidden, with nothing on the page or in the log saying why.
Reproduced on today's main, in a crew workspace where FORGE_URL names the remote forge:
POST /signup with Origin: http://localhost:3000 → 403 forbidden
POST /signup with no Origin header → 303 (works)
The mechanism is correct and deliberate: publicUrl rewrites the request's origin to app.config.url (src/http/context.ts:44-52), which src/main.ts:51 takes from FORGE_URL; crossOrigin (context.ts:59) then compares the browser's Origin against it and, seeing the remote host, rejects the post as cross-site. A browser always sends Origin; curl usually does not, which is why the API and scripted checks keep working and only the browser breaks.
src/main.ts:38 already knows the trap — FORGE_URL there names the host, not this forge — but README.md's Run it block is two lines with no warning, and docs/APPS.md:181 documents FORGE_URL as the forge's own base URL, which is exactly what makes a crew member think theirs is right.
Acceptance
Files I expect to change
README.md, src/http/context.ts or wherever the refusal is turned into a response, test/web.test.ts.
Risks
Do not log the whole request. One line, two origins, no headers and no body — this is a security path.
If the log already says something at a level nobody reads, raising it is the fix; say which you did.
Worth a sentence in docs/APPS.md beside FORGE_URL too, since that table is what made the variable look harmless.
Run the forge locally with
FORGE_URLalready in your environment — which every crew member's shell has, pointing at the forge they work for — and the web UI silently refuses every form. Sign-up, sign-in, tell the crew, ship:403 forbidden, with nothing on the page or in the log saying why.Reproduced on today's
main, in a crew workspace whereFORGE_URLnames the remote forge:The mechanism is correct and deliberate:
publicUrlrewrites the request's origin toapp.config.url(src/http/context.ts:44-52), whichsrc/main.ts:51takes fromFORGE_URL;crossOrigin(context.ts:59) then compares the browser'sOriginagainst it and, seeing the remote host, rejects the post as cross-site. A browser always sendsOrigin; curl usually does not, which is why the API and scripted checks keep working and only the browser breaks.src/main.ts:38already knows the trap —FORGE_URLthere names the host, not this forge — butREADME.md's Run it block is two lines with no warning, anddocs/APPS.md:181documentsFORGE_URLas the forge's own base URL, which is exactly what makes a crew member think theirs is right.Acceptance
Files I expect to change
README.md,src/http/context.tsor wherever the refusal is turned into a response,test/web.test.ts.Risks
docs/APPS.mdbesideFORGE_URLtoo, since that table is what made the variable look harmless.Suggested: Mason.