Releases: gofiber/fiber
v3.0.0-beta.4
🚀 New Features
- Add Startup Probe to Healthcheck Middleware by @kirankumar-grootan in #3069
- Add support for RebuildTree by @luk3skyw4lker in #3074
- Add Max Func to Limiter Middleware by @luk3skyw4lker in #3070
- Add support for TrustProxy by @xEricL in #3170
- Add Context Support to RequestID Middleware by @JIeJaitt in #3200
- Add TestConfig to app.Test() for configurable testing by @grivera64 in #3161
- Add support for creating Fiber client from existing FastHTTP client by @mitulagr2 in #3214
- Add buffered streaming support by @grivera64 in #3131
- Add support for CBOR encoding by @imsk17 in #3173
- Add AllLogger to Config by @haochunchang in #3153
- Add support for graceful shutdown timeout in ListenConfig by @ksw2000 in #3220
- Add support for AutoTLS / ACME by @wangjq4214 in #3201
- Add support for iterator methods to Fiber client by @efectn in #3228
- Add support for configuring TLS Min Version by @dozheiny in #3248
- Add Drop method to DefaultCtx for silent connection termination by @ryanbekhen in #3257
- Middleware/session: re-write session middleware with handler by @sixcolors in #3016
🧹 Updates
- Updates to fiberlog benchmarks and documentation by @gaby in #3059
- Update benchmarks for Logger Middleware by @gaby in #3061
- Enforce key length for EncryptCookie middleware default functions by @gaby in #3056
- Improve and simplify logic of ctx.Next() by @gaby in #3063
- Improve performance of Adaptor Middleware by @gaby in #3078
- Refactor Benchmark Results Workflow by @gaby in #3082
- Use Named Fields Instead of Positional and Align Structures to Reduce Memory Usage by @gaby in #3079
- Improve performance of helper functions by @gaby in #3086
- Use utils Trim functions instead of the strings/bytes functions by @ReneWerner87 in #3087
- Improve Performance of c.Body() by 125% by @gaby in #3090
- Add Benchmarks for Rewrite Middleware by @gaby in #3092
- Consolidate Logic of Handling the Request Body by @ad3n in #3093
- Add support for go1.23 and golangci-lint v1.60.1 by @gaby in #3101
- Use msgp for flash message encoding/decoding by @efectn in #3099
- Optimize IsFromLocal() performance by @gaby in #3140
- Replace vendored gorilla/schema package by @efectn in #3152
- Middleware/CORS Remove Scheme Restriction by @zingi in #3163
- Improve naming convention for Context returning functions by @gaby in #3193
- Mark go1.23 as minimum go version by @efectn in #3226
- Rename the Method Names of FormData and FormDatas (#3251) by @ksw2000 in #3255
- Improve Performance of Fiber Router by @gaby in #3261
🐛 Bug Fixes
- Middleware/cache: Fix typo by @miyamo2 in #3145
- Middleware/cache: Runtime error: index out of range [0] with length 0 by @brunodmartins in #3075
- Middleware/Adaptor: Duplicates cookies by @sigmundxia in #3151
- Client: Fix SetProxyURL functionality by @efectn in #3109
- Fix square bracket notation in Multipart FormData by @efectn in #3235
- Fasthttp errors cause panic when Params is used by @efectn in #3055
- Use Content-Length for bytesReceived and bytesSent tags in Logger Middleware by @gaby in #3066
- Error check in Form binder by @devhaozi in #3110
- Handle un-matched open brackets in the query params by @dojutsu-user in #3126
- Fix issue with default logger when creating RequestCtx by @gaby in #3134
- Behavior of
DefaultCtx.Fresh
when 'Last-Modified' and 'If-Modified-Since' are equal by @miyamo2 in #3150 - Close File After SaveFileToStorage by @gopkg-dev in #3197
- Make SetValWithStruct set zero values and support more types #3167 by @ksw2000 in #3227
- EnableSplittingOnParsers is not functional by @efectn in #3231
- Memory leak removal in the idempotency middleware by @sunnyyssh in #3263
- Fix race condition by @sixcolors in #3081
- Nil pointer dereference with Must Bind binding by @ItsMeSamey in #3171
🛠️ Maintenance
- Bump golangci-lint to v1.62.0 by @gaby in #3196
- Bump golangci-lint to v1.61.0 by @gaby in #3135
- Bump golangci-lint to v1.60.3 by @gaby in #3119
- Bump golang.org/x/crypto from 0.30.0 to 0.31.0 by @dependabot in #3247
- Bump golang.org/x/crypto from 0.28.0 to 0.30.0 by @dependabot in #3243
- Bump github.com/valyala/fasthttp from 1.57.0 to 1.58.0 by @dependabot in #3244
- Bump github.com/valyala/fasthttp from 1.56.0 to 1.57.0 by @dependabot in #3183
- Bump github.com/valyala/fasthttp from 1.55.0 to 1.56.0 by @dependabot in #3146
- Bump github.com/tinylib/msgp from 1.2.4 to 1.2.5 by @dependabot in #3240
- Bump github.com/tinylib/msgp from 1.2.3 to 1.2.4 by @dependabot in #3185
- Bump github.com/tinylib/msgp from 1.2.1 to 1.2.3 by @dependabot in #3182
- Bump github.com/tinylib/msgp from 1.1.8 to 1.2.1 by @ReneWerner87 in #3147
- Bump github.com/stretchr/testify from 1.9.0 to 1.10.0 by @dependabot in #3217
- Bump github.com/gofiber/utils/v2 from 2.0.0-beta.6 to 2.0.0-beta.7 by @dependabot in #3174
- Bump github.com/gofiber/utils/v2 from 2.0.0-beta.4 to 2.0.0-beta.5 by @dependabot in #3062
- Bump DavidAnson/markdownlint-cli2-action from 18 to 19 by @dependabot in #3266
- Bump DavidAnson/markdownlint-cli2-action from 17 to 18 by @dependabot in #3208
- Bump DavidAnson/markdownlint-cli2-action from 16 to 17 by @dependabot in #3128
- Bump codecov/codecov-action from 5.1.1 to 5.1.2 by @dependabot in #3256
- Bump codecov/codecov-action from 5.0.7 to 5.1.1 by @dependabot in #3234
- Bump codecov/codecov-action from 5.0.4 to 5.0.7 by @dependabot in #3213
- Bump codecov/codecov-action from 5.0.2 to 5.0.4 by @dependabot in #3210
- Bump codecov/codecov-action from 5.0.0 to 5.0.2 by @dependabot in #3209
- Bump codecov/codecov-action from 4.6.0 to 5.0.0 by @dependabot in #3207
- Bump codecov/codecov-action from 4.5.0 to 4.6.0 by @dependabot in #3154
- Bump benchmark-action/github-action-benchmark from 1.20.3 to 1.20.4 by @dependabot in #3177
- Bump actions/checkout from 3 to 4 by @dependabot in #3083
📚 Documentation
- Add support for consistent documentation using markdownlint by @gaby in #3064
- Update example in middleware/cors to v3 by @AuroraTea in #3116
- Update recover docs to not use reserved keyword by @glensargent in #3129
- Fix typos in client hooks documentation by @yinheli in #3133
- Replaced link to russian mozilla docs by @nexovec in #3142
- Removed zero width white space from logger docs by @oktayozkan0 in #3144
- Fix typo on comment by @ad3n in #3158
- Typo in hooks documentation by @SantiagoBobrik in #3164
- Update README.md by @s19835 in #3165
- Revert "Update README.md (#3165)" by @gaby in #3166
- Update What's New documentation by @Alequi...
v2.52.6
🐛 Bug Fixes
- Use Content-Length for bytesReceived and bytesSent tags in Logger Middleware in v2 by @gaby in #3067
- Fix handle un-matched open brackets in the query params by @dojutsu-user in #3121
- Middleware/CORS: Remove Scheme Restriction by @zingi in #3168
- Respect Immutable config for Body() by @nickajacks1 in #3246
- Support Square Bracket Notation in Multipart Form data by @ReneWerner87 in #3268
📚 Documentation
- Add detailed documentation for the templates guide by @grivera64 in #3113
🛠️ Maintenance
- Update benchmark-action to v1.20.3 by @gaby in #3084
- Add CODEOWNERS file by @gaby in #3124
- Update dependencies by @gaby in #3254
- Add parallel benchmark for Next() by @gaby in #3259
Full Changelog: v2.52.5...v2.52.6
v3.0.0-beta.3
🚀 New Features
- Middleware/static: add static middleware (#3006)
- Middleware/cache: Add Cache Invalidation Option to Cache Middleware (#3036)
- Middleware/keyauth: Add support for custom KeyLookup functions in the Keyauth middleware (#3028)
- Add support for zstd compression (#3041)
- Add configuration support to c.SendFile() (#3017)
- Add support for longtests during CI (#3054)
- Add CHIPS support to Cookie (#3047)
🧹 Updates
- Middleware/cors: Config, lists as list types (#2962)
- Middleware/session: Remove extra release and acquire ctx calls in session_test.go (#3044)
- Optimize Cache middleware handler (#3031)
- Adding a generator to generate the CTX interface (#3024)
- Add Benchmarks for IsProxyTrusted() (#2933)
🐛 Bug Fixes
- Fix some struct names in comments (#2974)
- Fixes #3038 "v3 Flash Message with redirect is not working" (#3046)
- Middleware/session: mutex for thread safety (#3049)
- Middleware/session: fix data-race with sync.Pool (#3051)
🛠️ Maintenance
- Bump github.com/valyala/fasthttp from 1.52.0 to 1.53.0 (#3000)
- Bump github.com/valyala/fasthttp from 1.54.0 to 1.55.0 (#3037)
- Updated fasthttp to 1.54.0 release (#3010)
📚 Documentation
- Add docs for new client (#2991)
- Consolidate and Document Core Changes in v3 (#2934)
- Fix broken link to slim template in FAQ (#2969)
- Fix merge conflict in documentation (#2957)
- Fix some comments (#2983)
- Update intro.md to make clear
fiber.Ctx
is not thread-safe. (#3014) - Improve ctx.Locals method description, godoc and example (#3032)
- Add zero-allocation section to README (#3039)
- Middleware/csrf: Update config TrustedOrigin comments (#2963)
- Middleware/cors middleware (#2979)
Full Changelog: v3.0.0-beta.2...v3.0.0-beta.3
Thank you @efectn, @gaby, @hcancelik, @dave-gray101, @sixcolors, @ReneWerner87, @orvillesimba, @deferdeter, @rabarar, @dockercui and @omaskery for making this update possible.
v2.52.5
👮 Security
Middleware/session: Session Middleware Token Injection Vulnerability - GHSA-98j2-3j3p-fw2v
🧹 Updates
- Middleware/session: Remove extra release and aquire ctx calls in session_test.go (#3043)
🐛 Bug Fixes
- Middleware/monitor: middleware reporting of CPU usage (#2984)
- Middleware/session: mutex for thread safety (#3050)
📚 Documentation
- Improve ctx.Locals method description and example (#3030)
- Improve ctx.Locals method documentation (#3033)
- Update README_id.md (#3045)
Full Changelog: v2.52.4...v2.52.5
Thank you @nyufeng, @PaulTitto and @sixcolors for making this update possible.
v3.0.0-beta.2
🚀 New
- Binding: Initial support for binding (#1981)
- Addon: add retry mechanism (#1972)
- Client: client refactor (#1986)
- Middleware/csrf: Add support for trusted origins (#2910)
- Middleware/csrf: TrustedOrigins using https://*.example.com style subdomains (#2925)
- Middleware/cors: Add support for Access-Control-Allow-Private-Network (#2908)
- Middleware/proxy: Add DialDualStack option for upstream IPv6 support (#2900)
- Convert fiber.Ctx type to interface (#1928)
- Merge Listen methods & ListenConfig (#1930)
- New Route method (#2065)
- Router interface changes (#2176)
- New redirection methods (#2014)
- New mounting system (#2022)
- Generate msgp tests (#2263)
- Make app.Test accept a time.Duration timeout (#2269)
- Add QueryParser for get query using generic (#2776)
- Addition of Locals Function with Go Generics as an Alternative to c.Locals (#2813)
- Add support for custom constraints (#2807)
- Adding GetReqHeaders and GetRespHeaders (#2831)
- Implement new generic functions: Params, Get and Convert (#2850)
🧹 Updates
- Middleware/adpator: Add parallel benchmarks to adaptor middleware (#2870)
- Middleware/csrf,limiter: Update CSRF and Limiter to remove repetitive names (#2846)
- Middleware/earlydata (#2270)
- Middleware/filesystem: Refactor filesystem middleware with
io/fs
(#2027) - Middleware/healthchecker: Migrate HealthChecker to v3 (#2884)
- Middleware/idempotency (#2253)
- Middleware/logger: Remove mutex lock in logger middleware (#2840)
- Middleware/logger: refactor logger middleware (#1979)
- Client: Rename "ClientNew" Function to "New" (#2896)
- Router: return status 501 instead of 400 on unknown method (#2220)
- Add
[]byte
support toutils.EqualFold
(#2029) - Remove
utils.Trim*
because stdlib has same performance in go1.19 (#2030) - Use testify for assertion (#2036)
- Change startup message (#2041)
- Cleanup (#2255)
- Update Ctx.Format to match Express's res.format (#2766)
- Change interface{} to any (#2796)
- Clean up errcheck config (#2841)
- Update startup message formatting (#2847)
- Add inamedparam linter (#2848)
- Simplify content negotiation code (#2865)
- Expand Tests and Benchmarks for Log package (#2886)
- Performance optimizations (#2838, #2947)
🐛 Fixes
- Middleware/cors: CORS handling (#2938)
- Middleware/logger: Fix logger benchmarks (#2074)
- Middleware/logger: Print to stderr if log fails for default format (#2830)
- Fix benchmark results (#1982, #2130)
- Rename WithTlsConfig method to WithTLSConfig (#2570)
- ContextKey collisions (#2781)
- Fix testifylint errors in middleware (#2805)
- Fix remaining testifylint errors (#2806)
- Fix force type assertions in session_test.go (#2815)
- Added respects body immutability to ctx.Body() and ctx.BodyRaw() functions. (#2812)
- Testifylint failure that fell through the cracks (#2821)
- Inconsistent and flaky unit-tests (#2892)
- Improper query/body parsing with embedded structs (#2906)
🛠️ Maintenance
- Bump minimum version of Go to 1.21 (#2911)
- Add go1.22 to test matrix (#2835)
- Update to use gofiber/utils/v2 (#2184)
- Speed up addon/retry tests (#2800)
- Re-enable tparallel linter (#2801)
- Do not retry flaky tests (#2875)
- Update test workflow to use gotestsum (#2895)
- Enabling shuffling, cleanup and consistency across tests (#2931)
- Run tests against Apple M1 platform (#2852)
- Merge V2 to v3 (#2864, #2944)
- Middleware/cors: Merge changes from v2 (#2922)
- Update golangci-lint to v1.55.2 (#2817)
- Address multiple lint rules (#2869)
- Make golangci-lint config stricter (#2874)
- Update golangci-lint to enable more lint rules (#2923)
- Bump golangci-lint to v1.56.1 (#2842)
- Bump golangci-lint to v1.56.2 (#2862)
- Bump golangci-lint to v1.57.1 (#2929)
- Bump github.com/google/uuid from 1.5.0 to 1.6.0 (#2810)
- Bump github.com/valyala/fasthttp from 1.51.0 to 1.52.0 (#2857)
- Bump github.com/stretchr/testify from 1.8.4 to 1.9.0 (#2888)
- Bump github.com/gofiber/utils/v2 from 2.0.0-beta.3 to 2.0.0-beta.4 (#2935)
📚 Documentation
- Update handler signature for v3 (#2794)
- Undocumented function in session.md (#2795)
- Fix typo in documentation (#2802)
- Fix a misspelled comment (#2809)
- Update Typo documentation (#2820)
- Fix typo in routing.md (#2836)
- Add CODEOWNERS file (#2851)
- Update Version Numbers in Docs (#2853)
- Fix code snippet indentation in /docs/api/middleware/keyauth.md (#2868)
- Update docs to reflect fiber.Ctx struct to interface change (#2880)
- Fix TrustedProxies documentation related to IP ranges (#2887)
- Improve translation (#2899)
- Refactor Documenation for HealthCheck (#2905)
- Fixed a typo in app.go (#2912)
- Cleanup and updates to README files (#2914)
- Remove repetitive words (#2917)
Full Changelog: v2.52.4...v3.0.0-beta.2
Thank you @efectn, @Behzad-Khokher, @the-hotmann, @gozeloglu, @trim21, @wangjq4214, @KrisCarr, @pjebs, @balcieren, @leonklingele, @sixcolors, @nickajacks1, @gandaldf, @StrawHatHacker, @ryanbekhen, @theleeeo, @nnnkkk7, @canks69, @asyslinux, @brunodmartins, @gaby, @linogomez, @Fenny, @grivera64, @ReneWerner87, @luk3skyw4lker, @dreamscached, @emirhansirkeci, @sebytza23, @techerfan, @racerole, @negrel, @devhsoj, @dozheiny for making this update possible.
v2.52.4
🐛 Fixes
- Middleware/cors: CORS handling by @sixcolors in #2937
- Middleware/cors: Vary header handling non-cors OPTIONS requests by @sixcolors in #2939
Full Changelog: v2.52.3...v2.52.4
v2.52.3
🐛 Fixes
- Middleware/cors: Handling and wildcard subdomain matching by @sixcolors in #2915
- Middleware/cors: Categorize requests correctly by @sixcolors in #2921
- Middleware/csrf: Fix Benchmark Tests by @sixcolors in #2932
Full Changelog: v2.52.2...v2.52.3
v2.52.2
v2.52.1
👮 Security
Middleware/cors: Insecure CORS Configuration Allowing Wildcard Origin with Credentials - GHSA-fmg4-x8pw-hjhg
🐛 Fixes
- Middleware/healthcheck: Not working with route group(#2863)
📚 Documentation
- Fix default value to false in docs of QueryBool (#2811)
- Fix code snippet indentation in /docs/api/middleware/keyauth.md (#2867)
Full Changelog: v2.52.0...v2.52.1
Thank you @luk3skyw4lker, @CAEL0, @grivera64, @gaby and @sixcolors for making this update possible.
v2.52.0
🚀 New
- Middleware/healthcheck: Add liveness and readiness checks (#2509)
https://docs.gofiber.io/api/middleware/healthcheck
// Direct usage with default config
app.Use(healthcheck.New())
// Or extend your config for customization
app.Use(healthcheck.New(healthcheck.Config{
LivenessEndpoint: "/live",
LivenessProbe: func(c *fiber.Ctx) bool {
return true
},
ReadinessEndpoint: "/ready",
ReadinessProbe: func(c *fiber.Ctx) bool {
return serviceA.Ready() && serviceB.Ready() && ...
},
}))
🧹 Updates
- Middlewares: don't constrain middlewares context-keys to strings (#2751)
- Middleware/logger: colorize logger error message #2593 (#2773)
- Middleware/logger: changing default log output (#2730)
- Middleware/logger: log client IP address by default (#2755)
- Middleware/encryptcookie: update default config (#2753)
- Improve benchmarks for getOffer (#2739)
🛠️ Maintenance
- Bump github/codeql-action from 2 to 3 (#2763)
- Bump github.com/google/uuid from 1.4.0 to 1.5.0 (#2762)
- Bump actions/setup-go from 4 to 5 (#2754)
- Bump golang.org/x/sys from 0.14.0 to 0.15.0 (#2744)
- Bump github.com/valyala/fasthttp from 1.50.0 to 1.51.0 (#2721)
🐛 Fixes
- Middleware/redirect : fix for redirect with query params (#2748)
- Middleware/adaptor: Adaptor + otelfiber issue #2641 (#2772)
- Middleware/cors: Should use the defined AllowedOriginsFunc config when AllowedOrigins is empty (#2771)
- Middleware/session: Race in session middleware tests (#2740)
- Middleware/csrf: Fix failing CSRF tests (#2720)
- Fix race condition in parallel tests (#2734)
- utils.IsIPv4 and net.ParseIP have inconsistent results #2735 (#2736)
📚 Documentation
- Middleware/csrf: Improve csrf docs (#2726)
- Update app.md for indentation (#2761)
- Update default config (#2753)
- Update CONTRIBUTING.md (#2752)
Full Changelog: v2.51.0...v2.52.0
Thank you @MehmetFiratKomurcu, @benjajaja, @brunodmartins, @gilwo, @iredmail, @itswcg, @luk3skyw4lker, @muhammadkholidb, @nickajacks1, @sixcolors and @tokelo-12 for making this update possible.