github gofiber/fiber v2.51.0

latest releases: v3.0.0-beta.3, v2.52.5, v3.0.0-beta.2...
12 months ago

๐Ÿš€ New

// Consideration of parameters in the accepted headers
// Accept: text/plain, application/json; version=1; foo=bar

app.Get("/", func(c *fiber.Ctx) error {
  // Extra parameters in the accept are ignored
  c.Accepts("text/plain;format=flowed") // "text/plain;format=flowed"

  // An offer must contain all parameters present in the Accept type
  c.Accepts("application/json") // ""

  // Parameter order and capitalization does not matter. Quotes on values are stripped.
  c.Accepts(`application/json;foo="bar";VERSION=1`) // "application/json;foo="bar";VERSION=1"
})
// Passing a custom json type
ctx.JSON(fiber.Map{
    "type": "https://example.com/probs/out-of-credit",
    "title": "You do not have enough credit.",
    "status": 403,
    "detail": "Your current balance is 30, but that costs 50.",
    "instance": "/account/12345/msgs/abc",
  }, fiber.)

๐Ÿงน Updates

  • Ctx.Range: reduce allocations (#2705)
  • Middleware/pprof: improve performance (#2709)

๐Ÿ› ๏ธ Maintenance

  • Bump golang.org/x/sys from 0.13.0 to 0.14.0 (#2707)
  • Bump github.com/google/uuid from 1.3.1 to 1.4.0 (#2693)
  • Bump actions/setup-node from 3 to 4 (#2690)
  • Bbump github.com/mattn/go-isatty from 0.0.19 to 0.0.20 (#2679)

๐Ÿ› Fixes

  • Middleware/limiter: fix intermittent failures (#2716)
  • Naming of routes works wrong after mount #2688 (#2689)
  • Fix method validation on route naming (#2686)

๐Ÿ“š Documentation

  • Changed "Twitter" to "X (Twitter)" in README.md Contribute Section (#2696)
  • Add additional information as to why GetReqHeaders returns a map where the values are slices of strings (#2698)
  • Enhance csrf.md (#2692)

Full Changelog: v2.50.0...v2.51.0

Thank you @BandhiyaHardik, @database64128, @efectn, @moritz157, @nickajacks1, @rhburt and @sixcolors for making this update possible.

Don't miss a new fiber release

NewReleases is sending notifications on new releases.