IPs
Returns an array of IP addresses specified in the X-Forwarded-For request header.
- c.IPs() []string
- // X-Forwarded-For: proxy1, 127.0.0.1, proxy3
- app.Get("/", func(c *fiber.Ctx) {
- c.IPs() // ["proxy1", "127.0.0.1", "proxy3"]
- })
Returns an array of IP addresses specified in the X-Forwarded-For request header.
- c.IPs() []string
- // X-Forwarded-For: proxy1, 127.0.0.1, proxy3
- app.Get("/", func(c *fiber.Ctx) {
- c.IPs() // ["proxy1", "127.0.0.1", "proxy3"]
- })
本文档使用 BookStack 构建