mirror of https://github.com/gofiber/fiber.git
6 Commits (ec48a76f14914bbac38a992a25f2cbc91643999a)
Author | SHA1 | Message | Date |
---|---|---|---|
|
ec48a76f14
|
V2 to v3 merge (#2864)
* Update pull_request_template.md
* Update v3-changes.md
* Update CONTRIBUTING.md (#2752)
Grammar correction.
* chore(encryptcookie)!: update default config (#2753)
* chore(encryptcookie)!: update default config
docs(encryptcookie): enhance documentation and examples
BREAKING CHANGE: removed the hardcoded "csrf_" from the Except.
* docs(encryptcookie): reads or modifies cookies
* chore(encryptcookie): csrf config example
* docs(encryptcookie): md table spacing
* build(deps): bump actions/setup-go from 4 to 5 (#2754)
Bumps [actions/setup-go](https://github.com/actions/setup-go) from 4 to 5.
- [Release notes](https://github.com/actions/setup-go/releases)
- [Commits](https://github.com/actions/setup-go/compare/v4...v5)
---
updated-dependencies:
- dependency-name: actions/setup-go
dependency-type: direct:production
update-type: version-update:semver-major
...
Signed-off-by: dependabot[bot] <support@github.com>
Co-authored-by: dependabot[bot] <49699333+dependabot[bot]@users.noreply.github.com>
* 🩹 middleware/logger/: log client IP address by default (#2755)
* middleware/logger: Log client IP address by default.
* Update doc.
* fix: don't constrain middlewares' context-keys to strings 🐛 (#2751)
* Revert "Revert "🐛 requestid.Config.ContextKey is interface{} (#2369)" (#2742)"
This reverts commit
|
|
|
059c0e33ed |
🎨 Style: Clean up errcheck config
Globally ignore several methods that always return nil error. Disable revive and gosec rules for error checking in favor of errcheck. |
|
|
2b03f47fae
|
🚀 Performance improvements (#2838)
* Add new supporter
* Add new test condition
* Add Handler Type
* Update app.go
* Update group.go
* Add Handler Type
* Update ViewEngine
* Update Templates Interface
* Update template examples
* Update fasthttp to v1.13.1
* Default cookie SameSite to Lax
* - static file routing fixed for fasthttp 1.13
- fix expected cookie values in tests
* Update template examples
* Update fasthttp to v1.13.1
Co-Authored-By: Thomas van Vugt <thomasvvugt@users.noreply.github.com>
* Cookie SameSite defaults to Lax
Co-Authored-By: Thomas van Vugt <thomasvvugt@users.noreply.github.com>
Co-Authored-By: Queru <pascal@queru.net>
* Fix router bug
Co-Authored-By: RW <renewerner87@googlemail.com>
* Remove unused code
Co-Authored-By: RW <renewerner87@googlemail.com>
* Add more static tests
Co-Authored-By: RW <renewerner87@googlemail.com>
* Update app_test.go
Co-Authored-By: RW <renewerner87@googlemail.com>
* Update Static tests
Co-Authored-By: RW <renewerner87@googlemail.com>
* Update app_test.go
Co-Authored-By: RW <renewerner87@googlemail.com>
* Update app_test.go
Co-Authored-By: RW <renewerner87@googlemail.com>
* Fix handler next calls
Co-Authored-By: RW <renewerner87@googlemail.com>
* Update router.go
Co-Authored-By: RW <renewerner87@googlemail.com>
* Update ctx.go
Co-Authored-By: RW <renewerner87@googlemail.com>
* Update app_test.go
Co-Authored-By: RW <renewerner87@googlemail.com>
* Remove nextHandler
Co-Authored-By: RW <renewerner87@googlemail.com>
* Remove lencount
Co-Authored-By: RW <renewerner87@googlemail.com>
* Add ErrorHandler
* Add ErrorHandler tests
* Add recover by default
* Enable recover by default
* Add App()
* Add ErrorHandler
* Enable recover by default
* Add ErrorHandler
* Add App() & Middleware
* Add RequestID
* Add new supporters
* Update shields
* Add mw
* Update basic_auth.go
* Update README.md
* Update spacing
* Update basic_auth_test.go
* Update ctx_test.go
* Add tests
* Update middleware
* up
* Small improvements
Use optimized `utils.ToString` and avoid `once.Do`
**Before**
```
BenchmarkLogfKeyAndValues/test_logf_with_debug_level_and_key-values-24 7323432 153.8 ns/op 89 B/op 1 allocs/op
BenchmarkLogfKeyAndValues/test_logf_with_info_level_and_key-values-24 8171703 144.5 ns/op 81 B/op 1 allocs/op
BenchmarkLogfKeyAndValues/test_logf_with_warn_level_and_key-values-24 8207860 142.8 ns/op 81 B/op 1 allocs/op
BenchmarkLogfKeyAndValues/test_logf_with_format_and_key-values-24 7500332 159.1 ns/op 135 B/op 2 allocs/op
BenchmarkLogfKeyAndValues/test_logf_with_one_key-24 10024760 131.0 ns/op 155 B/op 2 allocs/op
```
**After**
```
BenchmarkLogfKeyAndValues/test_logf_with_debug_level_and_key-values-24 13797813 77.42 ns/op 77 B/op 0 allocs/op
BenchmarkLogfKeyAndValues/test_logf_with_info_level_and_key-values-24 15375350 75.43 ns/op 73 B/op 1 allocs/op
BenchmarkLogfKeyAndValues/test_logf_with_warn_level_and_key-values-24 14926300 75.28 ns/op 75 B/op 1 allocs/op
BenchmarkLogfKeyAndValues/test_logf_with_format_and_key-values-24 12860275 90.27 ns/op 134 B/op 2 allocs/op
BenchmarkLogfKeyAndValues/test_logf_with_one_key-24 15649615 74.98 ns/op 100 B/op 1 allocs/op
```
* Fix WithCtxCaller test
* Fix lint
* Fix lint
* Replace Sprintf with byebufferpool in ctx.String()
# Original fn using Sprintf
Benchmark_Ctx_String-24 3846717 318.0 ns/op 152 B/op 8 allocs/op
Benchmark_Ctx_String-24 3780208 315.9 ns/op 152 B/op 8 allocs/op
Benchmark_Ctx_String-24 3627513 315.1 ns/op 152 B/op 8 allocs/op
Benchmark_Ctx_String-24 3712863 317.4 ns/op 152 B/op 8 allocs/op
// Modified using bytebufferpool
Benchmark_Ctx_String-24 8131666 149.3 ns/op 96 B/op 5 allocs/op
Benchmark_Ctx_String-24 7626406 148.3 ns/op 96 B/op 5 allocs/op
Benchmark_Ctx_String-24 8194621 149.2 ns/op 96 B/op 5 allocs/op
Benchmark_Ctx_String-24 8297750 156.6 ns/op 96 B/op 5 allocs/op
* Fix linting
* Use bytebufferpool in default logger
* Fix linting
* Lint fix
* Update linter.yml
* Update linter.yml
* Disable caching as recommended by golangci-lint
* 🩹 fix lint errors
---------
Co-authored-by: ReneWerner87 <ReneWerner87@googlemail.com>
Co-authored-by: Thomas van Vugt <thomasvvugt@users.noreply.github.com>
Co-authored-by: Queru <pascal@queru.net>
Co-authored-by: ReneWerner87 <rene@gofiber.io>
Co-authored-by: Juan Calderon-Perez <835733+gaby@users.noreply.github.com>
|
|
|
59410278f1
|
chore: change interface{} to any (#2796) | |
|
fc2ab3387a
|
🩹Fix incorrect log depth when use log.WithContext (#2666)
fix withContext caller |
|
|
fefc533834
|
🚀 Add Logger interface and fiberlog (#2499)
* add log for fiber * replace log in fiber * add Log use to adapt for log libraries * Update app.go Co-authored-by: Tomás Warynyca <41587659+tomaswarynyca@users.noreply.github.com> * wip: add log docs * add WithLogger use to print key and value * remove CtxLogger and add WithContext use to bind Context * fix errcheck * fix errcheck * update log.md --------- Co-authored-by: Tomás Warynyca <41587659+tomaswarynyca@users.noreply.github.com> |