bouncer/internal/proxy/director/util.go
William Petit e66938f1d3
All checks were successful
Cadoles/bouncer/pipeline/head This commit looks good
feat: initial commit
2023-05-21 22:27:25 +02:00

19 lines
326 B
Go

package director
import (
"net/http"
"forge.cadoles.com/Cadoles/go-proxy"
"forge.cadoles.com/Cadoles/go-proxy/util"
)
func createMiddlewareChain(handler http.Handler, middlewares []proxy.Middleware) http.Handler {
util.Reverse(middlewares)
for _, m := range middlewares {
handler = m(handler)
}
return handler
}