Enable gzip compression on the server side
This commit is contained in:
parent
06837a8776
commit
582c8c99ec
@ -13,6 +13,7 @@ import (
|
||||
"github.com/Sirupsen/logrus"
|
||||
"github.com/jmoiron/sqlx"
|
||||
_ "github.com/lib/pq"
|
||||
"github.com/phyber/negroni-gzip/gzip"
|
||||
"github.com/urfave/negroni"
|
||||
)
|
||||
|
||||
@ -78,6 +79,7 @@ func main() {
|
||||
n := negroni.Classic()
|
||||
n.Use(authMiddleware)
|
||||
n.Use(negroni.NewStatic(http.Dir(cf.PublicDir)))
|
||||
n.Use(gzip.Gzip(gzip.DefaultCompression))
|
||||
n.UseHandler(env.Router)
|
||||
n.Run(":" + cf.Port)
|
||||
}
|
||||
|
Loading…
x
Reference in New Issue
Block a user