Forward performs the given http request and fills the given http response. This method will return a fiber.Handler
(addr string, clients ...*fasthttp.Client)
| 141 | // Forward performs the given http request and fills the given http response. |
| 142 | // This method will return a fiber.Handler |
| 143 | func Forward(addr string, clients ...*fasthttp.Client) fiber.Handler { |
| 144 | return func(c fiber.Ctx) error { |
| 145 | c.Request().Header.Set("X-Real-IP", c.IP()) |
| 146 | return Do(c, addr, clients...) |
| 147 | } |
| 148 | } |
| 149 | |
| 150 | // Do performs the given http request and fills the given http response. |
| 151 | // This method can be used within a fiber.Handler |