mirror of
https://github.com/traefik/traefik.git
synced 2025-09-27 16:51:24 +02:00
lint
This commit is contained in:
parent
17546c3a08
commit
a58750992d
@ -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…
x
Reference in New Issue
Block a user