Zum Inhalt springen

Fiber Release Notes

Einträge
34
Quellen
1
Zuletzt aktualisiert

Folge Fiber, um die Release Notes in deinen Feed zu holen.

Fiber

v3.7.0

🚀 New

  • Update fasthttp to v1.78.0 (#4779, #4803, #4862) fasthttp v1.78.0 (from v1.75.0) hardens request framing, multipart parsing, redirects and file serving, and speeds up path normalization, query parsing, header setters and Client.Do. https://github.com/valyala/fasthttp/releases/tag/v1.78.0
  • Support map fields in query and form binding (#4788) Struct fields of type map[string]T now bind from query strings and form bodies; attributes[color] and attributes.color both give the key color.
    type Filter struct {
        Attributes map[string]string   `query:"attributes"` // ?attributes[color]=red&attributes.size=m
        Tags       map[string][]string `query:"tags"`       // ?tags[sale]=yes&tags[sale]=new
        Limits     map[string]int      `query:"limits"`     // ?limits[max]=5
    }
    
    https://docs.gofiber.io/api/bind#map-fields
  • Add AllowSymlinksOutsideRoot to the static middleware (#4803) A root on disk is now confined: symbolic links that leave it, and absolute ones, are handled like missing files unless AllowSymlinksOutsideRoot is set.
    app.Use("/assets", static.New("./public", static.Config{
        AllowSymlinksOutsideRoot: true, // default: false
    }))
    
    https://docs.gofiber.io/middleware/static#config
  • Let proxy.DoRedirects and the Fiber client drop extra sensitive headers on a redirect (#4800) …

Originalquelle(öffnet in neuem Tab)Problem melden

Fiber

v3.6.1

🧹 Updates

  • Consolidate media-type parameter parsing into internal/mediatype (#4750)
  • Fix modernize and revive lint issues (#4759)

🐛 Fixes

  • Fix client, session, basicauth and other bugs found in the audit (#4752)

🛠️ Maintenance

  • bump github.com/gofiber/utils/v2 from 2.6.1 to 2.6.2 (#4760)
  • bump github.com/klauspost/compress from 1.20.1 to 1.20.3 (#4757)
  • bump github.com/molecule-man/go-brrr from 1.2.0 to 1.3.0 (#4758)
  • bump the golang-modules group with 3 updates (#4755)
  • bump release-drafter/release-drafter from 7.9.0 to 7.10.0 (#4756)
  • bump actions/setup-node from 7.0.0 to 7.1.0 (#4754)

📚 Documentation

  • Sync the documentation with the v3.6.0 code (#4751)

📒 Documentation: https://docs.gofiber.io/

💬 Discord: https://gofiber.io/discord

Full Changelog: https://github.com/gofiber/fiber/compare/v3.6.0...v3.6.1

Thank you @alexandear, @gaby, @ninadsutrave and @ReneWerner87 for making this release possible.

Originalquelle(öffnet in neuem Tab)Problem melden

Fiber

Fiber v3.6.0 mit Leistungssteigerung

Fiber v3.6.0 aktualisiert fasthttp auf v1.75.0 und erreicht damit wieder das Tempo von v2, trotz zusätzlicher Sicherheitsmechanismen.

⚡ Performance

Fiber v3.6.0 ships with fasthttp v1.75.0. With it, Fiber v3 is back on par with the speed of v2, despite the additional security mechanisms built in since then.

Time per request vs. v2 v3.5.0 (fasthttp v1.73.0) v3.6.0 (fasthttp v1.75.0)
fasthttp only +18% -5%
Static route +16% -14%
Route parameter +15% -13%
Middleware chain +13% -12%
Header lookup +29% +3%
Locals +33% +5%
JSON response +6% -3%
JSON bind +14% -2%
Median of all 22 scenarios +10% -5%

Negative is faster than v2. v3.6.0 was measured on main three days before the release. All scenarios are published on our benchmarks page, where we now continuously make sure that v3 does not get slower again. https://gofiber.github.io/benchmarks/

🚀 New

  • Add csrf.NewCrossOriginProtection for tokenless CSRF protection (#4596) New tokenless middleware that rejects unsafe cross-origin browser requests by their Sec-Fetch-Site and Origin headers; no cookie, token or storage needed.
    app.Use(csrf.NewCrossOriginProtection(csrf.CrossOriginConfig{
        TrustedOrigins: []string{"https://admin.example.com"},
    }))
    
    https://docs.gofiber.io/middleware/csrf#cross-origin-protection-without-tokens
  • Update fasthttp to v1.75.0 (#4667, #4740) …

Originalquelle(öffnet in neuem Tab)Problem melden

Fiber

Fiber Version 3.5.0: Proxy-Härtung mit SecurityPolicy und schnelleres Routing

Fiber v3.5.0 härtet die Proxy-Middleware mit der neuen proxy.SecurityPolicy (standardmäßig werden private/Loopback-Upstreams, Nicht-http(s)-Schemata und HTTPS-zu-HTTP-Redirect-Downgrades abgelehnt), ergänzt den Struct-Tag binding_source für eigene Bindungsreihenfolgen sowie die Option SkipUnmatchedRoutes für schnelle 404/405-Antworten und beschleunigt das Route-Matching.

🚀 New

  • Harden proxy middleware (#4405) New proxy.SecurityPolicy with secure defaults: private/loopback upstreams, non-http(s) schemes and HTTPS-to-HTTP redirect downgrades are rejected and hop-by-hop headers stripped.
    proxy.WithSecurityPolicy(proxy.SecurityPolicy{
        AllowPrivateIPs: true, // internal upstreams are blocked by default
    })
    
    https://docs.gofiber.io/middleware/proxy#security
  • Add support for custom binding precedence (#4544) New binding_source struct tag overrides the Bind().All() source order per struct; the resolved order is cached per reflect.Type.
    type SearchReq struct {
        Name string `binding_source:"query,header,cookie,body,uri" query:"name" header:"x-name" json:"name"`
    }
    
    https://docs.gofiber.io/api/bind#custom-precedence
  • Add SkipUnmatchedRoutes with two-tier 404/405 fast path (#4486) New fiber.Config option that answers unregistered paths with 404/405 before the middleware chain runs (CORS preflight exempt, off by default).
    app := fiber.New(fiber.Config{
        SkipUnmatchedRoutes: true, // default: false
    })
    
    https://docs.gofiber.io/api/fiber#skipunmatchedroutes

🧹 Updates

  • Speed up route matching with a flat tree index, leading-byte candidate rejection and a specialized /const/:param matcher (#4558)
  • Quick-reject routes on precomputed slash-count bounds (#4517)
  • Restore Route inlining lost in the RFC 9110 changes (#4501) …

Originalquelle(öffnet in neuem Tab)Problem melden

Fiber

Fiber 2.52.14: X-Real-IP-Fix bei BalancerForward aus v3 zurückportiert

Fiber v2.52.14 bringt den Fix für das Überschreiben des X-Real-IP-Headers bei BalancerForward aus v3 zurück nach v2.

<!-- Release notes generated using configuration in .github/release.yml at v2 -->

What's Changed

🐛 Bug Fixes

New Contributors

  • @terraincognita07 made their first contribution

Full Changelog: https://github.com/gofiber/fiber/compare/v2.52.13...v2.52.14

Originalquelle(öffnet in neuem Tab)Problem melden

Fiber

Fiber 3.4.0: HTTP-QUERY-Methode, Session-WithContext und einheitliche Constraints

Version 3.4.0 bringt vollständige Unterstützung der HTTP-QUERY-Methode (app.Query(), client.Query()), WithContext-Varianten für Session-Storage-Zugriffe sowie ein einheitliches ConstraintHandler-Interface für eingebaute und eigene Routen-Constraints.

🚀 New

  • Complete HTTP QUERY method support (#4436, #4456) Adds the HTTP QUERY method (RFC 10008): fiber.MethodQuery, app.Query() routing, safe/idempotent handling in csrf, idempotency, earlydata and cache, plus client.Query() shorthands.
    app.Query("/search", func(c fiber.Ctx) error {
        return c.Send(c.Body()) // QUERY carries the query expression in the body
    })
    
    https://docs.gofiber.io/client/rest#query
  • Add WithContext variants for session storage I/O (#4393) SaveWithContext, DestroyWithContext, RegenerateWithContext and ResetWithContext propagate deadlines/cancellation to the session storage backend; the plain methods keep working unchanged.
    sess := session.FromContext(c)
    err := sess.SaveWithContext(ctx) // storage write bounded by ctx
    
    https://docs.gofiber.io/middleware/session#session-with-context-timeoutscancellation
  • Unify internal and custom constraints into a single interface (#4397) Built-in and custom route constraints now share one ConstraintHandler interface; the optional ConstraintAnalyzer precomputes constraint data at route registration, removing per-request parsing. Existing CustomConstraint implementations keep working unchanged.
    app.RegisterCustomConstraint(evenConstraint{}) // implements Name() + Execute()
    app.Get("/items/:id<even>", handler)
    ``` …
    

Originalquelle(öffnet in neuem Tab)Problem melden

Fiber

Fiber 3.3.0: Regex-Engine, hostauthorization-Middleware und kontextbezogene Logs

Version 3.3.0 ermöglicht eine konfigurierbare Regex-Engine für den Router, ergänzt die hostauthorization-Middleware gegen DNS-Rebinding, lässt Prefork an fasthttp/prefork delegieren und unterstützt kontextbezogene Logs über log.SetContextTemplate.

🚀 New

  • Add support for configuring the Regex engine on the router (#4254) Swap the compiler used for regex() route constraints. Assign a drop-in engine such as coregex.MustCompile for faster matching;Fiber reuses the compiled matcher across requests.
    app := fiber.New(fiber.Config{
        RegexHandler: coregex.MustCompile, // default: regexp.MustCompile
    })
    
    https://docs.gofiber.io/api/fiber#regexhandler
  • Host auth middleware (#4199) New hostauthorization middleware that validates the incoming Host header against an allowlist (exact host, .subdomain wildcard, CIDR range) to protect against DNS rebinding attacks.
    app.Use(hostauthorization.New(hostauthorization.Config{
        AllowedHosts: []string{"api.myapp.com", ".myapp.com", "10.0.0.0/8"},
    }))
    
    https://docs.gofiber.io/middleware/hostauthorization
  • Delegate implementation to fasthttp/prefork (#4210) Prefork now delegates to fasthttp's prefork package and adds PreforkRecoverThreshold (max child restarts before the master exits) and PreforkLogger to ListenConfig. https://docs.gofiber.io/api/fiber#preforkrecoverthreshold
  • Add support for contextual logs (#4241) Render request-scoped fields in log.WithContext(c) by configuring a template with log.SetContextTemplate, reusing the middleware/logger engine (including ${value:key} for arbitrary context values).

Originalquelle(öffnet in neuem Tab)Problem melden

Fiber

Fiber 3.2.0: Pagination, Domain-Routing, BindError und viele Fixes

Version 3.2.0 ergänzt unter anderem Route.URL(), host-basiertes Routing mit Domain(), eine Pagination-Middleware, den Typ BindError, einen PanicHandler in der recover-Middleware und Antwortformate für healthcheck sowie zahlreiche Fehlerbehebungen und Optimierungen.

🚀 New

🧹 Updates

  • Optimize speed (#4231)
  • Remove duplicate benchmark handling and update benchmark action version (#4108)

🐛 Fixes

  • Fix race condition in TestTimeout_ContextPropagation (#4119)
  • Fix ARMv7 build overflow in etag middleware (#4190)
  • Fix HTML escaping in AutoFormat (#4228)
  • Structured default cache keys, and controls (#4224)
  • Enforce BodyLimit on request decompression and multipart form parsing (#4213)
  • Implement releaseData function for better resource management (#4209)
  • Strip path from referer before matching trusted origins (#4204)
  • Improve clarity for ProxyHeader and TrustProxy configuration (#4140)
  • Prefork children exit immediately in Docker containers (#4133)
  • Fix math.MaxUint32 overflow in etag middleware on 32-bit platforms (#4135) …

Originalquelle(öffnet in neuem Tab)Problem melden

Fiber

Fiber 3.1.0: Erweiterte Kontext-Helfer für Middlewares und Härtungen

Version 3.1.0 erweitert die Middleware-Kontext-Helfer um die Option PassLocalsToContext und enthält viele Härtungen und Fehlerbehebungen, etwa bei Nil-Handling, Dateinamen-Bereinigung und Range-Header-Limits.

🚀 New

  • expand middleware context helpers (#4079)
app := fiber.New(fiber.Config{
    PassLocalsToContext: true, // default: false
})

// Works for requestid, csrf, session, basicauth, keyauth middlewares
app.Use(requestid.New())

app.Get("/", func(ctx fiber.Ctx) error {
    // Value helpers from middlewares works now with 3 different context items
    id := requestid.FromContext(ctx)              // works always
    id := requestid.FromContext(ctx.RequestCtx()) // works always
    id := requestid.FromContext(ctx.Context())    // works only when `PassLocalsToContext` is true
    
    return c.SendString(id)
})

https://docs.gofiber.io/api/fiber/#passlocalstocontext

🧹 Updates

  • update utils and add go 1.26 for test workflow (#4087)
  • optimize helpers performance (#4049)
  • harden numeric constraint parsing and expand route tests (#4054)

🐛 Fixes

  • harden DefaultRes.Format against nil handler panics (#4105)
  • guard nil request in adaptor LocalContextFromHTTPRequest (#4097)
  • fix Unix-socket support in IsProxyTrusted (#4088)
  • harden proxy nil client handling in Do/Forward paths (#4083)
  • add nil-safety to response decode helpers (#4081)
  • sanitize attachment/download filenames (#4070)
  • harden flash cookie detection (#4078)
  • fix bind struct validation only for struct targets (#4082)
  • enforce Range header limit configuration (#4071)
  • apply limits to msgp serialization (#4065) …

Originalquelle(öffnet in neuem Tab)Problem melden

Fiber

Fiber 3.0.0: Große neue Hauptversion mit Migrationstool

Version 3.0.0 ist die neue Hauptversion von Fiber mit zahlreichen Neuerungen wie benutzerdefinierten Constraints, Trusted Origins, AutoTLS/ACME, Msgpack-Unterstützung und UNIX-Sockets, zudem gibt es ein Migrationstool für den Umstieg von v2.

For a detailed view of all changes and the migration guide, visit: https://docs.gofiber.io/whats_new

Try our new migration tool to help you upgrade from v2 to v3:

go install github.com/gofiber/cli/fiber@latest
fiber migrate --to v3

What's Changed

🚀 New Features

  • 🚀 App (Docs)
    • Rename WithTlsConfig method to WithTLSConfig in (#2570)
    • Use any as default Message type of Error struct in (#1925)
    • Add support for custom constraints in (#2807)
    • Add support for trusted origins in (#2910)
    • Add DialDualStack option for upstream IPv6 support in (#2900)
    • TrustedOrigins using https://*.example.com style subdomains in (#2925)
    • Add configuration support to c.SendFile() in (#3017)
    • Add CHIPS support to Cookie in (#3047)
    • Add TestConfig to app.Test() for configurable testing in (#3161)
    • Add buffered streaming support in (#3131)
    • Add support for AutoTLS / ACME in (#3201)
    • Add support for configuring TLS Min Version in (#3248)
    • Fix square bracket notation in Multipart FormData in (#3235)
    • Add support for application state management in (#3360)
    • Add support for NewErrorf in (#3463)
    • Add UNIX socket support in (#3535)
    • Add support for Msgpack in (#3565)
    • Add default UTF-8 charset in (#3583)
    • Support for SendEarlyHints in (#3483) …

Originalquelle(öffnet in neuem Tab)Problem melden

Fiber

Fiber 2.52.11: Mount-Verbesserungen und Fixes für limiter

Version 2.52.11 verbessert die Mount-Funktionalität, bringt rückportierte Fixes zum defensiven Kopieren und Korrekturen für die limiter-Middleware.

<!-- Release notes generated using configuration in .github/release.yml at v2 -->

What's Changed

🧹 Updates

🐛 Bug Fixes

Full Changelog: https://github.com/gofiber/fiber/compare/v2.52.10...v2.52.11

Originalquelle(öffnet in neuem Tab)Problem melden

Fiber

Fiber 3.0.0-rc.3: Neue Handler-Unterstützung, Client-Erweiterungen und Middleware-Updates

Version 3.0.0-rc.3 bringt unter anderem Cookie-Namen-Authentifizierung für EncryptCookie, HostClient- und LBClient-Support, native Unterstützung für net/http- und fasthttp-Handler, Express.js-artige Handler, ReloadViews() sowie Anpassungshooks für die Startup-Meldung.

🚀 New Features

🧹 Updates

Originalquelle(öffnet in neuem Tab)Problem melden

Fiber

Fiber 2.52.10: Fehlerbehebungen bei filesystem, recover und Immutable

Version 2.52.10 behebt Fehler beim Umgang mit ungültigen Pfaden im filesystem, bei der Ausgabeformatierung der recover-Middleware und bei der Durchsetzung der Immutable-Konfiguration und dokumentiert RoutePatternMatch.

<!-- Release notes generated using configuration in .github/release.yml at v2 -->

🐛 Bug Fixes

📚 Documentation

New Contributors

Full Changelog: https://github.com/gofiber/fiber/compare/v2.52.9...v2.52.10

Originalquelle(öffnet in neuem Tab)Problem melden

Fiber

Fiber 3.0.0-rc.2: Request-Inspection-Helfer, extractors-Paket und Redaktion von Werten

Version 3.0.0-rc.2 ergänzt Helfer zur Request-Inspektion, ein neues extractors-Paket und die Möglichkeit, Werte zu redigieren, zudem werden cache, compress, csrf, keyAuth und session überarbeitet.

🚀 New Features

🧹 Updates

Originalquelle(öffnet in neuem Tab)Problem melden

Fiber

Fiber 3.0.0-rc.1: Neue Optionen für basicAuth, csrf, limiter, proxy und session

Version 3.0.0-rc.1 bringt neue Funktionen wie gehashte BasicAuth-Passwörter, HeaderLimit, Extractor-Muster für Sessions, SendEarlyHints, einen generisch konfigurierbaren Logger und Koa-artige Req- und Res-Structs.

🚀 New Features

🧹 Updates …

Originalquelle(öffnet in neuem Tab)Problem melden

Fiber

Fiber 3.0.0-beta.5: Neuerungen bei keyAuth, logger, session und Ctx

Version 3.0.0-beta.5 ergänzt unter anderem context.Context-Unterstützung in keyauth, Skip und vordefinierte Formate im logger, Keys() in session, die Methode End() am Ctx, Multipart-Datei-Binding sowie die Req- und Res-API.

🚀 New Features

Originalquelle(öffnet in neuem Tab)Problem melden