Skip to content

v2.43.0

Compare
Choose a tag to compare
@github-actions github-actions released this 24 Mar 17:36
6988411

❗ BreakingChange

  • Drop go 1.16 support & update to fasthttp 1.45.0 (#2374)

Due to the fact that fasthttp, which fiber is based on in release 1.45.0, does not support go version 1.16 anymore, we had to remove it from our package as well.

🚀 New

app.ListenTLSWithCertificate(":443", cert); 
app.ListenMutualTLSWithCertificate(":443", cert, clientCertPool);
// GET http://example.com/?name=alex&want_pizza=false&id=

app.Get("/", func(c *fiber.Ctx) error {
    c.QueryBool("want_pizza")       // false
    c.QueryBool("want_pizza", true) // false
    c.QueryBool("alex")             // true
    c.QueryBool("alex", false)      // false
    c.QueryBool("id")               // true
    c.QueryBool("id", false)        // false

  // ...
})
// GET http://example.com/?name=alex&amount=32.23&id=

app.Get("/", func(c *fiber.Ctx) error {
    c.QueryFloat("amount")      // 32.23
    c.QueryFloat("amount", 3)   // 32.23
    c.QueryFloat("name", 1)     // 1
    c.QueryFloat("name")        // 0
    c.QueryFloat("id", 3)       // 3

  // ...
})
  session.New(session.Config{
    // Decides whether cookie should last for only the browser sesison.
    CookieSessionOnly: true,
  })
// DoRedirects performs the given http request and fills the given http response while following up to maxRedirectsCount redirects.
func DoRedirects(c *fiber.Ctx, addr string, maxRedirectsCount int, clients ...*fasthttp.Client) error
// DoDeadline performs the given request and waits for response until the given deadline.
func DoDeadline(c *fiber.Ctx, addr string, deadline time.Time, clients ...*fasthttp.Client) error
// DoTimeout performs the given request and waits for response during the given timeout duration.
func DoTimeout(c *fiber.Ctx, addr string, timeout time.Duration, clients ...*fasthttp.Client) error

🧹 Updates

  • Get mime fallback (#2340)
  • Middleware/requestid: don't call "Generator" func on existing request ID header (#2371)
  • Middleware/basicauth: Optimize Basic auth alloc (#2333)

🐛 Fixes

  • Middleware/requestid: Config.ContextKey is interface{} (#2369)
  • Middleware/cors: Fix cors * behavior #2338 (#2339)

📚 Documentation

  • Use proper discord invitation link (#2382)
  • Corrected coding typos in MountPath docs section (#2379)
  • Fix typo in docs (#2357)
  • Fix(docs): add missing comma (#2353)
  • Fix all inaccessible links in docs (#2349)
  • Automated synchronization with gofiber/docs (#2344)

Full Changelog: v2.42.0...v2.43.0

Thank you @CaioAugustoo, @HHongSeungWoo, @IwateKyle, @Rorke76753, @Skyenought, @UtopiaGitHub, @benjajaja, @derkan, @dozheiny, @efectn, @gaby, @leonklingele, @lublak, @msaf1980, @ryand67 and @yvestumushimire for making this update possible.