BaseURL

Returns the base URL (protocol + host) as a string.

  1. func (c *Ctx) BaseURL() string
  1. // GET https://example.com/page#chapter-1
  2. app.Get("/", func(c *fiber.Ctx) error {
  3. c.BaseURL() // https://example.com
  4. // ...
  5. })