Gzip middleware for Martini.
import (
"github.com/go-martini/martini"
"github.com/martini-contrib/gzip"
)
func main() {
m := martini.Classic()
// gzip every request
m.Use(gzip.All())
m.Run()
}
Make sure to include the Gzip middleware above other middleware that alter the response body (like the render middleware).