Releases: gofiber/fiber
v1.9.1
v1.9.0
Special thanks to József Sallai, Ray Mayemir, Encendre & Matthew Lee
🔥 New
app.Serve()
#265ctx.BodyParser()
now supports queries
🧹 Updates
🧬 Middleware
- https://github.com/gofiber/pprof gofiber/recipes#7
- https://github.com/gofiber/session #201
- https://github.com/gofiber/keyauth
- https://github.com/gofiber/jwt
- https://github.com/gofiber/redirect
🩹 Fixes
c.XHR()
is now in case sensitive- Some tests were inconsistent
Dependency Graph v1.9.0
v1.8.43
v1.8.42
v1.8.41
🔥 New
- app.Settings.ReadTimeout https://fiber.wiki/application#settings #238
- app.Settings.WriteTimeout https://fiber.wiki/application#settings #238
- app.Settings.IdleTimeout https://fiber.wiki/application#settings #238
v1.8.4
Some old deprecated functions are now removed and template engines are moved to a separate middleware .
🔥 New
- Static struct can be used to tweak settings for serving static files https://fiber.wiki/application#static
app.Static("/", "./static", fiber.Static{
Compress: true, // Optional, default: false
ByteRange: true, // Optional, default: false
Browse: true, // Optional, default: false
Index: "john.html" // Optional, default: "index.html",
})
🧹 Updates
- app.Static(prefix, root string, config ...Static)
- c.Method(
override ...string
) - c.Path(
override ...string
) TemplateEngine
now takes infunc(raw string, bind interface{}) (string, error)
for custom template engines see https://fiber.wiki/middleware#templateapp.Test(req, ms ...int)
Add optional timeout https://fiber.wiki/application#test (#236)SameSite
got added to Cookie https://fiber.wiki/context#cookie ( #233)
🩹 Fixes
- Serve index.html on root paths using Static #222 (comment)
1.11.x, 1.12.x, 1.13.x, 1.14.x
Go version are now also tested- Internal optimizations / clean-up
- Removed unused dependencies
- Static case sensitive mis matches #227
- Static Update file/folder changes #221
- Static Fix iconfont files #222 (comment)
- Add partial comments to all functions for faster development
- Remove unused
*Conn
from*Ctx
struct
🗑️ Removed
engine
argument inapp.Render()
https://fiber.wiki/context#rendermiddleware
from Fiber package -> https://fiber.wiki/middlewareapp.WebSocket
-> https://fiber.wiki/middleware#websocketapp.Recover
-> https://fiber.wiki/middleware#recoverSettings.Compression
-> https://fiber.wiki/middleware#compression
🧬 Middleware
template
engines https://fiber.wiki/middleware#template
index.mustache
<html>
<head>
<title>Template Demo</title>
</head>
<body>
Hi, my name is {{{name}}} and im {{{age}}} years old
</body>
</html>
server.go
package main
import (
"github.com/gofiber/fiber"
"github.com/gofiber/template"
)
func main() {
app := fiber.New()
app.Settings.TemplateEngine = template.Mustache()
app.Get("/", func(c *fiber.Ctx) {
bind := fiber.Map{
"name": "John",
"age": "35",
}
if err := c.Render("./index.mustache", bind); err != nil {
panic(err)
}
})
app.Listen(3000)
}
v1.8.3
go get -u github.com/gofiber/fiber
All future middleware will be external so we can update/add features without updating the main version.
🔥 New
- https://github.com/gofiber/basicauth
- https://github.com/gofiber/compression #222
- https://github.com/gofiber/cors
- https://github.com/gofiber/helmet
- https://github.com/gofiber/limiter
- https://github.com/gofiber/logger
- https://github.com/gofiber/recover
- https://github.com/gofiber/requestid
- https://github.com/gofiber/websocket
🩹 Fixes
- Locals are supported in new WebSocket middleware #205
- Route params are not effected by
CaseSensitive
anymore #214 - Header duplication / Normalization #216
🗑️ Deprecated
- app.WebSocket()
- settings.Compression
- c.Compress()
- middleware.BasicAuth()
- middleware.Cors()
- middleware.Helmet()
- middleware.Limiter()
- middleware.Logger()
- middleware.Recover()
- middleware.RequestID()
v1.8.2
go get -u github.com/gofiber/fiber/...
🔥 New
- ctx.Range https://fiber.wiki/context#range
- app.Settings.BodyLimit https://fiber.wiki/application#settings
- middleware.Recover(handle ...func(*Ctx, error)) https://fiber.wiki/middleware#recover
🧹 Updates
- app.Static(prefix, root string) / https://fiber.wiki/application#static
- app.Listen(address interface{}, tlsconfig ...*tls.Config) / https://fiber.wiki/application#listen
🩹 Fixes
- Allow TLS config #200 / https://fiber.wiki/application#listen
- Fiber router optimizations
- app.Settings.Immutable / this will now also keep []byte returns immutable
- ctx.Next() / allows to continue after other routes finished https://fiber.wiki/context#next
🗑️ Deprecated
- app.Recover()
- settings.GETOnly
- settings.TCPKeepalive
- settings.MaxConnsPerIP
- settings.ReadBufferSize
- settings.WriteBufferSize
- settings.ConcurrencySleep
- settings.DisableKeepAlive
- settings.ReduceMemoryUsage
- settings.MaxRequestsPerConn
- settings.TCPKeepalivePeriod
v1.8.1
go get -u github.com/gofiber/fiber/...
[NEW] app.Settings.Immutable / https://fiber.wiki/application#settings
[NEW] app.Settings.Compression / https://fiber.wiki/application#settings
[NEW] Ctx.Compress / https://fiber.wiki/context#compress
[NEW] Ctx.Range / https://fiber.wiki/context#range (thx @hanFengSan)
[NEW] middleware.BasicAuth / https://fiber.wiki/middleware#basicauth
[NEW] middleware.CORS / https://fiber.wiki/middleware#cors
[NEW] middleware.Limiter / https://fiber.wiki/middleware#limiter
[NEW] middleware.Logger / https://fiber.wiki/middleware#logger
[NEW] middleware.RequestID / https://fiber.wiki/middleware#requestid
[NEW] middleware.Helmet / https://fiber.wiki/middleware#helmet
[FIX] Internal optimizations
v1.8.0
[NEW] app.Settings.Immutable / https://fiber.wiki/application#settings
[RENAME] Settings.ViewFolder -> Settings.TemplateFolder https://fiber.wiki/context#render
[RENAME] Settings.ViewEngine -> Settings.TemplateEngine https://fiber.wiki/context#render
[RENAME] Settings.ViewExtension -> Settings.TemplateExtension https://fiber.wiki/context#render
[UPDATE] app.METHOD(path string, handlers ...func(*Ctx)) https://fiber.wiki/application#http-methods
[UPDATE] *Cookie https://fiber.wiki/context#cookie
[UPDATE] ctx.Cookie(*Cookie) https://fiber.wiki/context#cookie
[UPDATE] Removed path params for WebSocket https://fiber.wiki/application#websocket
[UPDATE] Update websocket to v1.4.2
[FIX] Immutable values #185
[FIX] Stronger typed API #178
[FIX] Argument conflict #159
[FIX] Convert Recover error
[FIX] Bundle template dependencies
[FIX] Many internal optimizations