Sourced from github.com/go-chi/chi/v5's releases.
v5.3.2
What's Changed
- feat(middleware): add text/markdown, text/csv, text/vtt to default compressible types by
@VojtechVitekin go-chi/chi#1151- docs: deployment recipe for middleware.ClientIPFromXFFTrustedProxies() by
@VojtechVitekin go-chi/chi#1111- fix: don't drop handlers that collide with a Mount()/Route() pattern by
@VojtechVitekin go-chi/chi#1148- Don't duplicate methods in Allow: header for 405 responses by
@flimzyin go-chi/chi#1029- fix(middleware): reject catch-all compress wildcards by
@VojtechVitekin go-chi/chi#1156
middleware.NewCompressor(level, "/*")never worked and silently compressed nothing. Instead of turning it into a compress-everything catch-all (as proposed in go-chi/chi#868 and go-chi/chi#1121), we decided to reject both "/" and "/*" at construction and panic. Compressing every response wastes CPU on already-compressed types (zip, jpeg, png), which is why the middleware keeps a curated default list. Users should pass explicit content types.Full Changelog: https://github.com/go-chi/chi/compare/v5.3.1...v5.3.2
3893906
fix(middleware): reject catch-all compress wildcards "/"
and "/*" (#1156)9b6ddcd
Don't duplicate methods in Allow: header for 405 responses (#1029)29164f0
fix: don't drop handlers that collide with a Mount()/Route() pattern (#1148)bc02284
docs: deployment recipe + verify checklist for
ClientIPFromXFFTrustedProxies ...60ecea5
feat(middleware): add text/markdown, text/csv, text/vtt to default
compressib...