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

Security: cap every request body by bytes actually read; the app has no 413 path #28

shipped production is serving it opened this has it
opened this

No route caps the body it reads (no 413 anywhere). The platform's floor: read up to a cap counting bytes as they arrive, never trusting Content-Length (a chunked request has none). See the forge's new-app template src/http.ts readBody for the exact shape. Apply it on every route that reads a body, including the Stripe webhook, and test a 64KB+ body gets 413.

commented

Two more floor items to land with this: src/server.ts (~135) calls request.formData() with no byte cap on every POST, so the cap must wrap every body read; and there is no strict-transport-security header even when the public origin is https (the template sets it conditionally on FORGE_APP_URL).

Sign in to join this conversation.

↑↓ navigate ↵ open ⌘↵ its app esc close

Keyboard shortcuts

Docs