lint
This commit is contained in:
parent
17546c3a08
commit
a58750992d
2 changed files with 3 additions and 4 deletions
|
@ -5,12 +5,12 @@ import (
|
||||||
"net/http"
|
"net/http"
|
||||||
)
|
)
|
||||||
|
|
||||||
// Rewrite is a middleware that allows redirections
|
// Compress is a middleware that allows redirections
|
||||||
type Compress struct {
|
type Compress struct {
|
||||||
}
|
}
|
||||||
|
|
||||||
//
|
// ServerHTTP is a function used by negroni
|
||||||
func (_ *Compress) ServeHTTP(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc) {
|
func (c *Compress) ServeHTTP(rw http.ResponseWriter, r *http.Request, next http.HandlerFunc) {
|
||||||
newGzipHandler := gziphandler.GzipHandler(next)
|
newGzipHandler := gziphandler.GzipHandler(next)
|
||||||
newGzipHandler.ServeHTTP(rw, r)
|
newGzipHandler.ServeHTTP(rw, r)
|
||||||
}
|
}
|
||||||
|
|
|
@ -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)
|
log.Debugf("Creating entryPoint redirect %s -> %s : %s -> %s", entryPointName, entryPoint.Redirect.EntryPoint, regex, replacement)
|
||||||
negroni := negroni.New()
|
negroni := negroni.New()
|
||||||
negroni.Use(rewrite)
|
negroni.Use(rewrite)
|
||||||
|
|
||||||
return negroni, nil
|
return negroni, nil
|
||||||
}
|
}
|
||||||
|
|
||||||
|
|
Loading…
Reference in a new issue