Skip to content

v2.51.0

Compare
Choose a tag to compare
@github-actions github-actions released this 14 Nov 07:35
dceb0b4

🚀 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)
  • Bump 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.