Subdomains
Returns a string slice of subdomains in the domain name of the request.
The application property subdomain offset, which defaults to 2
, is used for determining the beginning of the subdomain segments.
c.Subdomains(offset ...int) []string
// Host: "tobi.ferrets.example.com"
app.Get("/", func(c *fiber.Ctx) {
c.Subdomains() // ["ferrets", "tobi"]
c.Subdomains(1) // ["tobi"]
})