diff --git a/middlewares/compress.go b/middlewares/compress.go index 3415e4423..26709ad7b 100644 --- a/middlewares/compress.go +++ b/middlewares/compress.go @@ -5,12 +5,12 @@ import ( "net/http" ) -// Rewrite is a middleware that allows redirections +// Compress is a middleware that allows redirections type Compress struct { } -// -func (_ *Compress) ServeHTTP(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc) { +// ServerHTTP is a function used by negroni +func (c *Compress) ServeHTTP(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc) { newGzipHandler := gziphandler.GzipHandler(next) newGzipHandler.ServeHTTP(rw, r) } diff --git a/server.go b/server.go index 6c6ad12df..0d6cf7fb6 100644 --- a/server.go +++ b/server.go @@ -683,7 +683,6 @@ func (server *Server) loadEntryPointConfig(entryPointName string, entryPoint *En log.Debugf("Creating entryPoint redirect %s -> %s : %s -> %s", entryPointName, entryPoint.Redirect.EntryPoint, regex, replacement) negroni := negroni.New() negroni.Use(rewrite) - return negroni, nil }