What's Changed
- feat(middleware): add text/markdown, text/csv, text/vtt to default compressible types by @VojtechVitek in https://github.com/go-chi/chi/pull/1151
- docs: deployment recipe for middleware.ClientIPFromXFFTrustedProxies() by @VojtechVitek in https://github.com/go-chi/chi/pull/1111
- fix: don't drop handlers that collide with a Mount()/Route() pattern by @VojtechVitek in https://github.com/go-chi/chi/pull/1148
- Don't duplicate methods in Allow: header for 405 responses by @flimzy in https://github.com/go-chi/chi/pull/1029
- fix(middleware): reject catch-all compress wildcards by @VojtechVitek in https://github.com/go-chi/chi/pull/1156
middleware.NewCompressor(level, "/*")never worked and silently compressed nothing. Instead of turning it into a compress-everything catch-all (as proposed in https://github.com/go-chi/chi/issues/868 and https://github.com/go-chi/chi/pull/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