Posts tagged Middleware
The Security Middleware Suite: CORS / CSRF / JWT / Rate Limit / Binder
Gortex keeps body caps, CORS, CSRF, JWT, rate limiting and log redaction at framework level; JWT is pinned to HS256 and per-IP limiting behind a proxy needs TrustedProxies.
net/http and the Middleware Pattern
Most Go web frameworks (Gin, Echo, chi) sit on net/http: http.Handler and ServeHTTP are the only abstraction, and middleware is a closure wrapping a Handler, outermost first.