helper middleware and functionality for go-chi/chi
https://pkg.go.dev/github.com/lrstanley/chix/v2 β β 47
HEALTH 93 / Healthy
// momentum
// why it's here
- Active: last commit today
- Built almost entirely by one person
- Health 93/100 with only 44 stars
- Accepts sponsorship (github)
// how to help
// readme
:link: Table of Contents
:gear: Usage
go get -u github.com/lrstanley/chix/v2@latest
:sparkles: Features
http.Serverhelpers (Run,RunTLS) for starting and gracefully shutting down the server, with optional background jobs alongside HTTP vialrstanley/x/sync/scheduler.- Per-request
Configmiddleware: API base path, JSON encode/decode hooks, request decode/validate,slog.Logger, error resolvers, and masking of non-public 5xx errors. - RealIP middleware (trusted proxy chain parsing; not βtrust any
X-Forwarded-Forβ). - Private IP middleware for internal-only routes.
- Request ID middleware (client header or generated ID; header name configurable on
Config). - Rendering helpers: JSON, XML, CSV, and streaming CSV via iterators β all support
?pretty=truewhere applicable.