Hostname
Returns the hostname derived from the Host HTTP header.
c.Hostname() string
// GET http://google.com/search
app.Get("/", func(c *fiber.Ctx) {
c.Hostname() // "google.com"
})
Returned value is only valid within the handler. Do not store any references.
Make copies or use theImmutable
setting instead. Read more…