API-first HTML publishing — upload once, scan for secrets, serve privately via time-limited presigned URLs.
5 MBmax upload size
20uploads per 30 days
30 daysfree tier retention
1 hourpresigned URL TTL
01
1Upload
Authenticate & Receive
bodyLimit runs before auth — oversized payloads are rejected before bcrypt even runs, keeping costs low.
🛡️
Body size gate
Hono's bodyLimit middleware enforces 5 MB before any auth logic. Requests over the limit return 413 immediately.
🔑
API key verification
The first 12 chars (prefix) are used for a fast indexed DB lookup. The full key is then bcrypt.compare()'d against the stored hash — never stored in plaintext.
📊
Rolling rate limit
A COUNT(*) query checks active uploads in the past 30 days. Hard 429 at 20 — fire-and-forget last_used_at update so the check stays fast.
📥
Multipart parse
Hono's parseBody() extracts file, title, description, and tags from the form. Missing file → 400.
passes raw HTML to scanner
5 MBhard body limit
20uploads / 30 days
12-charprefix index lookup
02
2Process
Scan, Sanitize & Store
A two-stage security pipeline strips XSS vectors and redacts leaked secrets before the attribution footer is stamped and the file is written to R2.