Improved
v3.0.0-beta.5
π New Features
- Middleware/keyAuth: Add support for context.Context in keyauth middleware by @vhespanha in https://github.com/gofiber/fiber/pull/3287
- Middleware/logger: Add Skip function to logger middleware by @JIeJaitt in https://github.com/gofiber/fiber/pull/3333
- Middleware/logger: Add predefined log formats by @edvardsanta in https://github.com/gofiber/fiber/pull/3359
- Middleware/logger: Add support for ForceColors in Logger middleware by @yorickdewid in https://github.com/gofiber/fiber/pull/3428
- Middleware/session: Add support for Keys() in session middleware by @sixcolors in https://github.com/gofiber/fiber/pull/3517
- Middelware/timeout: Add config for Timeout middleware by @ReneWerner87 in https://github.com/gofiber/fiber/pull/3604
- Add End() method to Ctx by @grivera64 in https://github.com/gofiber/fiber/pull/3280
- Improve and Optimize ShutdownWithContext Func by @JIeJaitt in https://github.com/gofiber/fiber/pull/3162
- Add support for multipart file binding by @efectn in https://github.com/gofiber/fiber/pull/3309
- Add Req and Res API by @nickajacks1 in https://github.com/gofiber/fiber/pull/2894
- Add support for application state management by @efectn in https://github.com/gofiber/fiber/pull/3360
- Enhance CheckConstraint method for improved error handling by @JIeJaitt in https://github.com/gofiber/fiber/pull/3356
- Add
Allmethod to Bind by @edvardsanta in https://github.com/gofiber/fiber/pull/3373 - Add Support for service dependencies by @mdelapenya in https://github.com/gofiber/fiber/pull/3434
- Add Support for Removing Routes by @ckoch786 in https://github.com/gofiber/fiber/pull/3230
fiber.Contextimplement context.Context by @pjebs in https://github.com/gofiber/fiber/pull/3382- Add support for NewErrorf by @gaby in https://github.com/gofiber/fiber/pull/3463
- Add NewWithCustomCtx initialization helper by @ReneWerner87 in https://github.com/gofiber/fiber/pull/3476
- Add UNIX socket support by @LaptopCat in https://github.com/gofiber/fiber/pull/3535
- Add support for Msgpack by @hotrungnhan in https://github.com/gofiber/fiber/pull/3565
- Add context methods to
fiber.Storageinterface by @efectn in https://github.com/gofiber/fiber/pull/3566
π§Ή Updates
- Middleware/basicAuth: Enhance BasicAuth middleware to better comply with RFC 6750 by @gaby in https://github.com/gofiber/fiber/pull/3484
- Middleware/basicAuth: Improve BasicAuth middleware default security by @gaby in https://github.com/gofiber/fiber/pull/3522
- Middleware/cache: Improve cache middleware RFC compliance by @gaby in https://github.com/gofiber/fiber/pull/3488
- Middleware/cors: Improve CORS middleware response headers by @gaby in https://github.com/gofiber/fiber/pull/3505
- Middleware/cors: Improve CORS tests coverage by @gaby in https://github.com/gofiber/fiber/pull/3530
- Middleware/csrf: Improve CSRF tests coverage by @gaby in https://github.com/gofiber/fiber/pull/3531
- Middleware/csrf: Add missing CSRF token extractor tests by @gaby in https://github.com/gofiber/fiber/pull/3527
- Middleware/csrf: Refactor CSRF middleware and enhance documentation by @sixcolors in https://github.com/gofiber/fiber/pull/3598
- Middleware/csrf: Enhance CSRF tests to address unsafe header value issue (#2045) by @sixcolors in https://github.com/gofiber/fiber/pull/3485
- Middleware/earlyData: Improve EarlyData middleware tests coverage by @gaby in https://github.com/gofiber/fiber/pull/3520
- Middleware/encryptCookie: Enhance config validation in EncryptCookie middleware by @gaby in https://github.com/gofiber/fiber/pull/3491
- Middleware/envVar: Refactor EnvVar middleware by @gaby in https://github.com/gofiber/fiber/pull/3513
- Middleware/helmet: Improve Helmet middleware tests coverage by @gaby in https://github.com/gofiber/fiber/pull/3523
- Middleware/idempotency: Improve Idempotency middleware tests coverage by @gaby in https://github.com/gofiber/fiber/pull/3521
- Middleware/keyAuth: Enhance KeyAuth middleware to better comply with RFC 6750 by @gaby in https://github.com/gofiber/fiber/pull/3482
- Middleware/logger: Logger Middleware tests to use regex for time validation by @ReneWerner87 in https://github.com/gofiber/fiber/pull/3392
- Middleware/timeout: unify and enhance timeout middleware by @ReneWerner87 in https://github.com/gofiber/fiber/pull/3275
- Middleware/proxy: Fix proxy middleware tests for offline environments by @gaby in https://github.com/gofiber/fiber/pull/3467
- Middleware/proxy: Improve proxy middleware by @ReneWerner87 in https://github.com/gofiber/fiber/pull/3468
- Middleware/static: Improve static middleware security by @gaby in https://github.com/gofiber/fiber/pull/3595
- Middleware/static: Improve sanitizePath performance by @ReneWerner87 in https://github.com/gofiber/fiber/pull/3601
- Value of map is unused in uniqueRouteStack by @ksw2000 in https://github.com/gofiber/fiber/pull/3320
- Reduce the Memory Usage of ignoreHeaders by @ksw2000 in https://github.com/gofiber/fiber/pull/3322
- Improve Performance of getSplicedStrList by @ksw2000 in https://github.com/gofiber/fiber/pull/3318
- Add go1.24 to CI matrix by @gaby in https://github.com/gofiber/fiber/pull/3325
- Migrate randString to rand v2 by @ksw2000 in https://github.com/gofiber/fiber/pull/3329
- Sorting error in sortAcceptedTypes by @ksw2000 in https://github.com/gofiber/fiber/pull/3331
- Reduce the memory usage of RoutePatternMatch by @ksw2000 in https://github.com/gofiber/fiber/pull/3335
- Replace findLastCharsetPosition with strings.LastIndexByte by @ksw2000 in https://github.com/gofiber/fiber/pull/3338
- Replace isInCharset with bytes.IndexByte by @ksw2000 in https://github.com/gofiber/fiber/pull/3342
- Optimize routeParser by using sync.Pool by @ksw2000 in https://github.com/gofiber/fiber/pull/3343
- Fix linter workflow failures by @gaby in https://github.com/gofiber/fiber/pull/3354
- Mark unused tests with t.SkipNow by @alexandear in https://github.com/gofiber/fiber/pull/3366
- Remove two string fields in DefaultCtx to save 32 bytes by @ksw2000 in https://github.com/gofiber/fiber/pull/3353
- Replace treePath with treePathHash in DefaultCtx to reduce memory usage by @ksw2000 in https://github.com/gofiber/fiber/pull/3368
- Add Immutable benchmarks for default case by @gaby in https://github.com/gofiber/fiber/pull/3374
- Remove redundant field
methodinDefaultCtxby @ksw2000 in https://github.com/gofiber/fiber/pull/3372 - Simplify HealthCheck middleware by @gaby in https://github.com/gofiber/fiber/pull/3380
- Add findNextNonEscapedCharPosition for single-byte charset cases by @ksw2000 in https://github.com/gofiber/fiber/pull/3378
- Change c.Redirect() default status by @andradei in https://github.com/gofiber/fiber/pull/3415
- Improve routing treeBuild flow by @ReneWerner87 in https://github.com/gofiber/fiber/pull/3456
- Add unit-test for header injection by @gaby in https://github.com/gofiber/fiber/pull/3470
- Performance optimizations by @ReneWerner87 in https://github.com/gofiber/fiber/pull/3477
- Make genericParseType return error by @ksw2000 in https://github.com/gofiber/fiber/pull/3473
- Add URI Test case for Test_Ctx_Binders by @ReneWerner87 in https://github.com/gofiber/fiber/pull/3480
- Improve performance for "equalFieldType" function by @ReneWerner87 in https://github.com/gofiber/fiber/pull/3479
- Update minimum go version to 1.24 by @ReneWerner87 in https://github.com/gofiber/fiber/pull/3481
- Use slices.Contains to simplify code by @tongjicoder in https://github.com/gofiber/fiber/pull/3486
- Use maps.Copy to simplify code by @alexandear in https://github.com/gofiber/fiber/pull/3490
- Remove deprecated comments and documenting recent changes by @ReneWerner87 in https://github.com/gofiber/fiber/pull/3498
- Update loop syntax for retry mechanism by @MonkyMars in https://github.com/gofiber/fiber/pull/3516
- Remove repo codecov.yml by @gaby in https://github.com/gofiber/fiber/pull/3525
- Improve Retry addon tests coverage by @gaby in https://github.com/gofiber/fiber/pull/3526
- Improve hooks test coverage by @gaby in https://github.com/gofiber/fiber/pull/3524
- Update codecov configuration by @gaby in https://github.com/gofiber/fiber/pull/3528
- Improve Binder tests coverage by @gaby in https://github.com/gofiber/fiber/pull/3529
- Use GetState to reduce duplicate code by @ksw2000 in https://github.com/gofiber/fiber/pull/3542
- Improve Cookie() validation by @gaby in https://github.com/gofiber/fiber/pull/3546
- Improve Router tests coverage by @gaby in https://github.com/gofiber/fiber/pull/3550
- Improve Accept* compliance with RFC 9110 by @gaby in https://github.com/gofiber/fiber/pull/3548
- Refactor fasthttp iter calls to range loops by @ReneWerner87 in https://github.com/gofiber/fiber/pull/3559
- Fix compression benchmarks by @gaby in https://github.com/gofiber/fiber/pull/3561
- Add iterator helpers for client types by @ReneWerner87 in https://github.com/gofiber/fiber/pull/3560
- Improve iterator performance. by @ksw2000 in https://github.com/gofiber/fiber/pull/3562
- Update utils dependency by @ReneWerner87 in https://github.com/gofiber/fiber/pull/3576
- Refactor Opt-in support for CBOR by @ReneWerner87 in https://github.com/gofiber/fiber/pull/3580
- Simplify generic function calls by @axrav in https://github.com/gofiber/fiber/pull/3578
- Add modernize lint by @ReneWerner87 in https://github.com/gofiber/fiber/pull/3590
- Revert "Add support for context.Context in keyauth middleware" by @sixcolors in https://github.com/gofiber/fiber/pull/3364
- Revert "Add Context Support to RequestID Middleware" by @sixcolors in https://github.com/gofiber/fiber/pull/3365
π Bug Fixes
- Middleware/envVar: Fix missing Allow header in EnvVar middleware per RFC 9110 by @gaby in https://github.com/gofiber/fiber/pull/3570
- Middleware/static: Fix static/favicon middlewares file descriptor leaks by @gaby in https://github.com/gofiber/fiber/pull/3579
- Make Render bind parameter type any again by @efectn in https://github.com/gofiber/fiber/pull/3270
- Fix app.Test() auto-failing when a connection is closed early by @grivera64 in https://github.com/gofiber/fiber/pull/3279
- Align cache middleware with RFC7231 by @miyamo2 in https://github.com/gofiber/fiber/pull/3283
- Goroutine leakage by @JIeJaitt in https://github.com/gofiber/fiber/pull/3306
- `genericParseType parsing large uint leads to overflow by @ksw2000 in https://github.com/gofiber/fiber/pull/3315
- Fix handler order in routing by @ReneWerner87 in https://github.com/gofiber/fiber/pull/3321
- Update binder in form_test by @devhaozi in https://github.com/gofiber/fiber/pull/3336
- Fix client iterators when using break statement by @efectn in https://github.com/gofiber/fiber/pull/3357
- Handling of next param position by @KatzuYoru in https://github.com/gofiber/fiber/pull/3418
- Fix redirection flash messages violate cookie structure by @efectn in https://github.com/gofiber/fiber/pull/3457
- Parsing of IPv6 addresses by @gaby in https://github.com/gofiber/fiber/pull/3466
- Middlewares immutable config handling by @gaby in https://github.com/gofiber/fiber/pull/3494
- Subdomains offset handling by @gaby in https://github.com/gofiber/fiber/pull/3495
- Fix Cache-Control header parsing by @gaby in https://github.com/gofiber/fiber/pull/3534
- Fix Content-Type comparison in Is() by @gaby in https://github.com/gofiber/fiber/pull/3536
- Fix Subdomains() parsing for IDNs by @gaby in https://github.com/gofiber/fiber/pull/3538
- Fix Range() parsing of bytes unit by @gaby in https://github.com/gofiber/fiber/pull/3541
- Fix Range() handling of HTTP 416 per RFC 9110 by @gaby in https://github.com/gofiber/fiber/pull/3552
- Fix Etag validation per RFC 9110 by @gaby in https://github.com/gofiber/fiber/pull/3554
- Fix Accept-Language matching per RFC 4647 by @gaby in https://github.com/gofiber/fiber/pull/3553
- Fix Cache middleware handling of Age by @gaby in https://github.com/gofiber/fiber/pull/3547
- Fix Content-Disposition header per RFC 6266 by @gaby in https://github.com/gofiber/fiber/pull/3551
- Fix Body() handling of Content-Encoding per RFC 9110 by @gaby in https://github.com/gofiber/fiber/pull/3543
- Fix multipart boundary for Client per RFC 2046 by @gaby in https://github.com/gofiber/fiber/pull/3563
- Fix address parsing for leading/trailing spaces by @gaby in https://github.com/gofiber/fiber/pull/3569
- Fix CookieJar domain logic by @gaby in https://github.com/gofiber/fiber/pull/3564
- Fix handling of negative BodyLimit by @gaby in https://github.com/gofiber/fiber/pull/3599
- Fix MIME type equality checks by @gaby in https://github.com/gofiber/fiber/pull/3602
π οΈ Maintenance
- build(deps): bump kenchan0130/actions-system-info from 1.3.0 to 1.3.1 by @dependabot[bot] in https://github.com/gofiber/fiber/pull/3492
- build(deps): bump golang.org/x/net from 0.41.0 to 0.42.0 by @dependabot[bot] in https://github.com/gofiber/fiber/pull/3572
- build(deps): bump golang.org/x/net from 0.40.0 to 0.41.0 by @dependabot[bot] in https://github.com/gofiber/fiber/pull/3544
- build(deps): bump golang.org/x/net from 0.31.0 to 0.33.0 in the go_modules group by @dependabot[bot] in https://github.com/gofiber/fiber/pull/3293
- build(deps): bump golang.org/x/crypto from 0.38.0 to 0.39.0 by @dependabot[bot] in https://github.com/gofiber/fiber/pull/3506
- build(deps): bump golang.org/x/crypto from 0.37.0 to 0.38.0 by @dependabot[bot] in https://github.com/gofiber/fiber/pull/3438
- build(deps): bump golang.org/x/crypto from 0.36.0 to 0.37.0 by @dependabot[bot] in https://github.com/gofiber/fiber/pull/3395
- build(deps): bump golang.org/x/crypto from 0.35.0 to 0.36.0 by @dependabot[bot] in https://github.com/gofiber/fiber/pull/3341
- build(deps): bump golang.org/x/crypto from 0.33.0 to 0.35.0 by @dependabot[bot] in https://github.com/gofiber/fiber/pull/3327
- build(deps): bump golang.org/x/crypto from 0.32.0 to 0.33.0 by @dependabot[bot] in https://github.com/gofiber/fiber/pull/3305
- build(deps): bump golang.org/x/crypto from 0.31.0 to 0.32.0 by @dependabot[bot] in https://github.com/gofiber/fiber/pull/3274
- build(deps): bump github.com/valyala/fasthttp from 1.63.0 to 1.64.0 by @dependabot[bot] in https://github.com/gofiber/fiber/pull/3586
- build(deps): bump github.com/valyala/fasthttp from 1.62.0 to 1.63.0 by @dependabot[bot] in https://github.com/gofiber/fiber/pull/3557
- build(deps): bump github.com/valyala/fasthttp from 1.60.0 to 1.62.0 by @dependabot[bot] in https://github.com/gofiber/fiber/pull/3440
- build(deps): bump github.com/valyala/fasthttp from 1.59.0 to 1.60.0 by @dependabot[bot] in https://github.com/gofiber/fiber/pull/3391
- build(deps): bump github.com/valyala/fasthttp from 1.58.0 to 1.59.0 by @dependabot[bot] in https://github.com/gofiber/fiber/pull/3314
- build(deps): bump github.com/tinylib/msgp from 1.2.5 to 1.3.0 by @dependabot[bot] in https://github.com/gofiber/fiber/pull/3447
- build(deps): bump github.com/mattn/go-colorable from 0.1.13 to 0.1.14 by @dependabot[bot] in https://github.com/gofiber/fiber/pull/3277
- build(deps): bump github.com/gofiber/utils/v2 from 2.0.0-beta.9 to 2.0.0-beta.10 by @dependabot[bot] in https://github.com/gofiber/fiber/pull/3568
- build(deps): bump github.com/gofiber/utils/v2 from 2.0.0-beta.8 to 2.0.0-beta.9 by @dependabot[bot] in https://github.com/gofiber/fiber/pull/3540
- build(deps): bump github.com/gofiber/utils/v2 from 2.0.0-beta.7 to 2.0.0-beta.8 by @dependabot[bot] in https://github.com/gofiber/fiber/pull/3389
- build(deps): bump github.com/gofiber/schema from 1.5.0 to 1.6.0 by @dependabot[bot] in https://github.com/gofiber/fiber/pull/3574
- build(deps): bump github.com/gofiber/schema from 1.4.0 to 1.5.0 by @dependabot[bot] in https://github.com/gofiber/fiber/pull/3504
- build(deps): bump github.com/gofiber/schema from 1.3.0 to 1.4.0 by @dependabot[bot] in https://github.com/gofiber/fiber/pull/3462
- build(deps): bump github.com/gofiber/schema from 1.2.0 to 1.3.0 by @dependabot[bot] in https://github.com/gofiber/fiber/pull/3308
- build(deps): bump github.com/fxamacker/cbor/v2 from 2.8.0 to 2.9.0 by @dependabot[bot] in https://github.com/gofiber/fiber/pull/3581
- build(deps): bump github.com/fxamacker/cbor/v2 from 2.7.0 to 2.8.0 by @dependabot[bot] in https://github.com/gofiber/fiber/pull/3384
- build(deps): bump DavidAnson/markdownlint-cli2-action from 19 to 20 by @dependabot[bot] in https://github.com/gofiber/fiber/pull/3453
- build(deps): bump codecov/codecov-action from 5.4.2 to 5.4.3 by @dependabot[bot] in https://github.com/gofiber/fiber/pull/3459
- build(deps): bump codecov/codecov-action from 5.4.0 to 5.4.2 by @dependabot[bot] in https://github.com/gofiber/fiber/pull/3413
- build(deps): bump codecov/codecov-action from 5.3.1 to 5.4.0 by @dependabot[bot] in https://github.com/gofiber/fiber/pull/3334
- build(deps): bump codecov/codecov-action from 5.3.0 to 5.3.1 by @dependabot[bot] in https://github.com/gofiber/fiber/pull/3295
- build(deps): bump codecov/codecov-action from 5.1.2 to 5.3.0 by @dependabot[bot] in https://github.com/gofiber/fiber/pull/3292
π Documentation
- Middleware/adapter: Update adapter middleware documentation by @ReneWerner87 in https://github.com/gofiber/fiber/pull/3317
- Middleware/cors: Enhance CORS middleware documentation with preflight request details and infrastructure considerations by @sixcolors in https://github.com/gofiber/fiber/pull/3509
- Middleware/csrf: fix CSRF handler example by @sixcolors in https://github.com/gofiber/fiber/pull/3412
- Middleware/helmet: Update Helmet Middleware default values by @devhaozi in https://github.com/gofiber/fiber/pull/3348
- Middleware/helmet: Update helmet.md default values by @gaby in https://github.com/gofiber/fiber/pull/3350
- Middleware/idempotency: Idempotency add more detailed description for next method by @ReneWerner87 in https://github.com/gofiber/fiber/pull/3443
- Middleware/logger: Document usage of Custom Tags in Logger middleware by @sixcolors in https://github.com/gofiber/fiber/pull/3446
- Middleware/session: Fix examples in middleware/session by @AuroraTea in https://github.com/gofiber/fiber/pull/3435
- Middleware/static: Fix static middleware CacheDuration data type typo by @grivera64 in https://github.com/gofiber/fiber/pull/3273
- Update intro.md Static Files section by @lars-schumann in https://github.com/gofiber/fiber/pull/3303
- Add ctx.Drop() to whats_new.md by @aliziyacevik in https://github.com/gofiber/fiber/pull/3284
- Add
c.Drop()example towhats_new.mdby @grivera64 in https://github.com/gofiber/fiber/pull/3285 - Add Retry Addon documentation by @grivera64 in https://github.com/gofiber/fiber/pull/3330
- Add more validation examples by @mazyaryousefinia in https://github.com/gofiber/fiber/pull/3369
- Update docs for State Management by @gaby in https://github.com/gofiber/fiber/pull/3388
- Fix typos by @gaby in https://github.com/gofiber/fiber/pull/3464
- Fix more typos across code base by @gaby in https://github.com/gofiber/fiber/pull/3465
- Incorrect usage of backslash characters in the constraint β¦ by @hungthai1401 in https://github.com/gofiber/fiber/pull/3549
- Fix typos in code and docs by @gaby in https://github.com/gofiber/fiber/pull/3507
- Add custom constraint example by @ReneWerner87 in https://github.com/gofiber/fiber/pull/3539
- Add net/http compatiblity section by @gaby in https://github.com/gofiber/fiber/pull/3556
- Add documentation for Stale() by @gaby in https://github.com/gofiber/fiber/pull/3555
- Update utils guide documentation by @ReneWerner87 in https://github.com/gofiber/fiber/pull/3575
New Contributors
- @aliziyacevik made their first contribution in https://github.com/gofiber/fiber/pull/3284
- @lars-schumann made their first contribution in https://github.com/gofiber/fiber/pull/3303
- @vhespanha made their first contribution in https://github.com/gofiber/fiber/pull/3287
- @alexandear made their first contribution in https://github.com/gofiber/fiber/pull/3366
- @edvardsanta made their first contribution in https://github.com/gofiber/fiber/pull/3359
- @mazyaryousefinia made their first contribution in https://github.com/gofiber/fiber/pull/3369
- @ZihxS made their first contribution in https://github.com/gofiber/fiber/pull/3432
- @KatzuYoru made their first contribution in https://github.com/gofiber/fiber/pull/3418
- @yorickdewid made their first contribution in https://github.com/gofiber/fiber/pull/3428
- @mdelapenya made their first contribution in https://github.com/gofiber/fiber/pull/3460
- @ckoch786 made their first contribution in https://github.com/gofiber/fiber/pull/3230
- @tongjicoder made their first contribution in https://github.com/gofiber/fiber/pull/3486
- @MonkyMars made their first contribution in https://github.com/gofiber/fiber/pull/3516
- @hungthai1401 made their first contribution in https://github.com/gofiber/fiber/pull/3549
- @LaptopCat made their first contribution in https://github.com/gofiber/fiber/pull/3535
- @hotrungnhan made their first contribution in https://github.com/gofiber/fiber/pull/3565
- @axrav made their first contribution in https://github.com/gofiber/fiber/pull/3578
A fully-detailed view of all new features and the migration guide is available in our docs:
https://docs.gofiber.io/next/whats_new
Full Changelog: https://github.com/gofiber/fiber/compare/v3.0.0-beta.4...v3.0.0-beta.5