Skip to content

Releases: gofiber/fiber

v1.10.5

03 Jun 15:29
6e9fae8
Compare
Choose a tag to compare

🩹 Fixes

  • Hot-fix for app.Static caused by Fasthttp v1.13.1

v1.10.0

27 May 21:06
edb1001
Compare
Choose a tag to compare

Dear 🐻 Gophers,

Fiber v1.10.0 is finally released and it has some important changes we would like to share with you.

⚠️ Breaking Changes

  • All routes will return the registered Route metadata instead of App, chaining methods won't be possible anymore.
  • All template settings are replaced by the new ctx.Settings.Templates interface. See our updated template middleware for examples with support for 8 template engines.
📚 Show syntax
type Engine struct {
	templates *template.Template
}

func (e *Engine) Render(w io.Writer, name string, data interface{}) error {
	return e.templates.ExecuteTemplate(w, name, data)
}

func main() {
	app := fiber.New()
	engine := &Engine{
		// ./views/index.html
		// <h1>{{.Title}}</h1>
		templates: template.Must(template.ParseGlob("./views/*.html")),
	}
	app.Settings.Template = engine

	app.Get("/hello", func(c *fiber.Ctx) {
		c.Render("index", fiber.Map{
			"Title": "Hello, World!",
		})
	})
}

🔥 New


🩹 Fixes

  • Exact param keys in request paths are now matched as static paths #405
  • c.Params() now accepting case sensitive values and keys #392
  • Cookies SameSite attribute defaults to Lax if not set
  • c.Append() does not append duplicates anymore on case-sensitive values
  • c.SendFile("./404.html") would overwrite previous status codes, this has been fix. #391
  • app.Test Would throw an EOF error if you do not provide a Content-Length header when passing a body io.Reader with NewRequest. This is not necessary anymore, it will add the header for you if not provided.
  • ctx.Protocol() also checks the "X-Forwarded-Protocol", "X-Forwarded-Ssl" and "X-Url-Scheme" headers

🧹 Updates

  • app.Use & app.Group now supports /:params & /:optionals? inside the prefix path.
  • Fiber docs are now fully translated in Russian & Chinese
  • Add new supporters to README's
  • Update template examples in README's
  • Add ./public to Static examples in README's #411
  • Add new media articles to README's Improve performance & web-based authentication
  • With the help of @ReneWerner87 we produce zero garbage on matching and dispatching incoming requests. The only heap allocations that are made, is by building the key-value pairs for path parameters. If the requested route contains no parameters, not a single allocation is necessary.

🧬 Official Middlewares


🌱 Third Party Middlewares

v1.9.6

11 May 11:43
99f95b2
Compare
Choose a tag to compare

🚀 Fiber v1.9.6

Special thanks to @renanbastos93 & @ReneWerner87 for optimizing the current router.
Help use translate our API documentation by clicking here

🔥 New

  • AcquireCtx / ReleaseCtx
    The Ctx pool is now accessible for third-party packages
  • Fiber docs merged Russian translations 84%
  • Fiber docs merged Spanish translations 65%
  • Fiber docs merged French translations 40%
  • Fiber docs merged German translations 32%
  • Fiber docs merged Portuguese translations 24%

🩹 Fixes

  • Hotfix for interpolated params in nested routes #354
  • Some Ctx methods didn't work correctly when called without an *App pointer.
  • ctx.Vary sometimes added duplicates to the response header
  • Improved router by ditching regexp and increased performance by 817% without allocations.
// Tested with 350 github API routes
Benchmark_Router_OLD-4      614   2467460 ns/op   68902 B/op   600 allocs/op
Benchmark_Router_NEW-4     3429    302033 ns/op       0 B/op     0 allocs/op

🧹 Updates

  • Add context benchmarks
  • Remove some unnecessary functions from utils
  • Add router & param test cases
  • Add new coffee supporters to readme
  • Add third party middlewares to readme
  • Add more comments to source code
  • Cleanup some old helper functions

🧬 Middleware

v1.9.3

28 Apr 20:00
0419d08
Compare
Choose a tag to compare

🚀 Fiber v1.9.3

go get -u github.com/gofiber/fiber

Special thanks to @monzarrugh, @renanbastos93, @glaucia86, @bestgopher, @ofirrock, @jozsefsallai, @thomasvvugt, @elliotforbes, @Khaibin, @tianhongw, @arsmn, @da-z and everyone else who helped contribute to make this tag possible.

🔥 New

🧹 Updates

🧬 Middleware

🩹 Fixes

  • Some code blocks are re-used #310
  • Fiber's string conversion w/o allocation is now used in c.Range function #312
  • Typo's in ctx.go #294

v1.9.2

24 Apr 01:40
5410267
Compare
Choose a tag to compare

Special thanks to József Sallai, Ray Mayemir, Encendre,Matthew Lee, Alireza Salary & Thomas van Vugt and everyone else who helped contribute to make this possible.

🔥 New

🧹 Updates

🧬 Middleware

🗑️ Deprecated

  • c.Body() is not used for form values anymore.
    Use c.FormValue() to access any form value.
  • c.Cookies() must have a key.
    If you want the raw cookie header please use c.Get("Cookies")

🗑️ Removed

Dependency Graph v1.9.2

v1.9.1

20 Apr 14:35
be2f278
Compare
Choose a tag to compare

v1.9.0

13 Apr 13:26
776fb47
Compare
Choose a tag to compare

v1.8.43

31 Mar 08:23
feb7c59
Compare
Choose a tag to compare

🩹 Fixes

  • Reset status code #250

v1.8.42

31 Mar 08:23
feb7c59
Compare
Choose a tag to compare

🧹 Updates

  • c.JSON() & c.JSONP() now serialize 35% faster.
Benchmark_jsoniter-8         2283649    645 ns/op   128 B/op  2 allocs/op
Benchmark_jsoniter_pool-8    3540309    367 ns/op    48 B/op  1 allocs/op

v1.8.41

23 Mar 05:20
0b64373
Compare
Choose a tag to compare

🔥 New