1
0
mirror of https://github.com/labstack/echo.git synced 2024-11-28 08:38:39 +02:00

check proxy skipper before proceeding (#992)

This commit is contained in:
Amr Tamimi 2017-08-20 03:42:58 +02:00 committed by Vishal Rana
parent a26bc31e27
commit 7d67651a3b

View File

@ -142,6 +142,10 @@ func ProxyWithConfig(config ProxyConfig) echo.MiddlewareFunc {
return func(next echo.HandlerFunc) echo.HandlerFunc {
return func(c echo.Context) (err error) {
if config.Skipper(c) {
return next(c)
}
req := c.Request()
res := c.Response()
tgt := config.Balancer.Next()