BaseURL

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

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