mirror of
https://github.com/labstack/echo.git
synced 2025-04-21 12:17:04 +02:00
check proxy skipper before proceeding (#992)
This commit is contained in:
parent
a26bc31e27
commit
7d67651a3b
@ -142,6 +142,10 @@ func ProxyWithConfig(config ProxyConfig) echo.MiddlewareFunc {
|
|||||||
|
|
||||||
return func(next echo.HandlerFunc) echo.HandlerFunc {
|
return func(next echo.HandlerFunc) echo.HandlerFunc {
|
||||||
return func(c echo.Context) (err error) {
|
return func(c echo.Context) (err error) {
|
||||||
|
if config.Skipper(c) {
|
||||||
|
return next(c)
|
||||||
|
}
|
||||||
|
|
||||||
req := c.Request()
|
req := c.Request()
|
||||||
res := c.Response()
|
res := c.Response()
|
||||||
tgt := config.Balancer.Next()
|
tgt := config.Balancer.Next()
|
||||||
|
Loading…
x
Reference in New Issue
Block a user