IPs

Returns an array of IP addresses specified in the X-Forwarded-For request header.

  1. c.IPs() []string
  1. // X-Forwarded-For: proxy1, 127.0.0.1, proxy3
  2.  
  3. app.Get("/", func(c *fiber.Ctx) {
  4. c.IPs() // ["proxy1", "127.0.0.1", "proxy3"]
  5. })