IPs

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

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