Commit Graph
3 Commits
Author SHA1 Message Date
poslop 3facff3d1e Syntax highlighting, rate limiting, creator auto-unlock (#1, #2, #26)
CI / docker (push) Skipped
CI / test (push) Successful in 19s
#1: server-side regex highlighter (highlight.go) for go/python/js/json/bash/sql;
token span classes styled in app.css; per-line so gutter stays aligned.
#2: in-memory token-bucket rate limiter (ratelimit.go) on POST /api/pastes,
/api/guess-language and unlock POST; 429 + Retry-After + X-RateLimit headers.
#26: new-page JS POSTs the password to /{id} with ?next= after creation; the
unlock handler honors same-origin ?next= redirect so the creator lands on the
unlocked paste. POST /{id} route added.

Tests: ratelimit_test.go (burst/429, refill, unlock limit, highlight, auto-
unlock e2e); existing tests updated for per-test limiter isolation.
2026-09-08 21:09:25 -05:00
poslop 7d158834fc fix customslug test: use store receiver 2026-09-08 16:10:07 -05:00
poslop faf768ad80 Custom URLs: validated slugs with reserved words, uniqueness across pastes and cans 2026-09-08 16:09:43 -05:00