๐ New
- Added new 'AllowOriginsFunc' function. (#2394)
https://docs.gofiber.io/api/middleware/cors#config
๐ฎ Security hint
Note: Using this feature is discouraged in production and it's best practice to explicitly set CORS origins via AllowOrigins.
In this example any origin will be allowed via CORS.
For example, if a browser running on http://localhost:3000 sends a request, this will be accepted and the access-control-allow-origin response header will be set to http://localhost:3000.
app.Use(cors.New(cors.Config{
AllowOriginsFunc: func(origin string) bool {
return os.Getenv("ENVIRONMENT") == "development"
},
}))
- Public ShutdownWithContext (#2407)
https://docs.gofiber.io/api/app#server-shutdown
๐งน Updates
- Bump golang.org/x/sys from 0.6.0 to 0.7.0 (#2405)
- github/workflows: also run tests with Go 1.19.x (#2384)
- Bump github.com/mattn/go-isatty from 0.0.17 to 0.0.18 (#2381)
๐ Fixes
- Middleware/logger: Fix #2396, data race logger middleware (#2397)
- Middleware/timeout: Add original timeout middleware (#2367)
https://docs.gofiber.io/next/api/middleware/timeout
โWith version v2.38.1 we changed the behavior of the timeout function, this has now been undone and a function for use with context has been provided - Mounted subapps don't work correctly if parent app attached (#2331)
- Change default value of Querybool from true to false. (#2391)
โThe fallback value for not found or not boolean values was adjusted to the golang standard - Fix #2383, accepts mimeType (#2386)
๐ Documentation
- Added Azerbaijani README translation (#2411)
- Fix import and comma issues (#2410)
- Fix typos, and make middleware documentation more consistent (#2408)
- Added code link to fiber config fields (#2385)
- Adding to fac sub domain routing (#2393)
Full Changelog: v2.43.0...v2.44.0
Thank you @Jamess-Lucass, @ancogamer, @cmd777, @dozheiny, @eld4niz, @hakankutluay, @jcyamacho, @leonklingele and @shahriarsohan for making this update possible.