JIeJaitt
f725ded92b
🔥 feat: Add Context Support to RequestID Middleware ( #3200 )
...
* Rename UserContext() to Context(). Rename Context() to RequestCtx()
* feat: add requestID in UserContext
* Update Ctxt docs and What's new
* Remove extra blank lines
* ♻️ Refactor: merge issue #3186
* 🔥 Feature: improve FromContext func and test
* 📚 Doc: improve requestid middleware
* ♻️ Refactor: Rename interface to any
* fix: Modify structure sorting to reduce memory usage
---------
Co-authored-by: Juan Calderon-Perez <jgcalderonperez@protonmail.com>
Co-authored-by: Juan Calderon-Perez <835733+gaby@users.noreply.github.com>
2024-11-15 17:34:20 +01:00
Juan Calderon-Perez
8c3f81e2b7
v3: Use Named Fields Instead of Positional and Align Structures to Reduce Memory Usage ( #3079 )
...
* Use composites for internal structures. Fix alignment of structures across Fiber
* Update struct alignment in test files
* Enable alignment check with govet
* Fix ctx autoformat unit-test
* Revert app Config struct. Add betteralign to Makefile
* Disable comment on alert since it wont work for forks
* Update benchmark.yml
* Update benchmark.yml
* Remove warning from using positional fields
* Update router.go
2024-07-23 08:37:45 +02:00
nickajacks1
827013d789
chore: Fix testifylint errors in middleware ( #2805 )
2024-01-21 08:32:23 +01:00
Jason McNeil
2954e3bbae
♻️ v3: fix!: ContextKey collisions ( #2781 )
...
* fix: ContextKey collisions
* fix(logger): lint error
* docs(csrf): fix potential range error in example
2024-01-04 09:44:45 +01:00
Muhammed Efe Cetin
75bb02b87e
Merge remote-tracking branch 'origin/master' into v3-beta
2023-08-05 22:02:01 +03:00
Rorke76753
56839b433e
🚀 [Feature]: middleware/requestid: don't call "Generator" func on existing request ID header ( #2371 )
...
call uuid generator only if rid is empty
2023-03-15 09:45:42 +01:00
Benjamin Grosse
d7b36cde54
🐛 requestid.Config.ContextKey is interface{} ( #2369 )
...
requestid.Config.ContextKey is interface{}
Consistent with c.Locals(key inteface{}, ...).
Fixes #2356
2023-03-14 19:37:10 +01:00
Muhammed Efe Çetin
15e9235383
📝 docs: remove README.mds from middleware dirs
2023-03-06 16:42:35 +03:00
Muhammed Efe Çetin
088cde594d
Merge remote-tracking branch 'origin/master' into v3-beta
2023-02-05 23:43:42 +03:00
leonklingele
ac4ce21d9c
🐛 Bug: Fix issues introduced in linting PR ( #2319 )
...
* internal: revert linting changes
Changes to the internal package should not have been made in 167a8b5e94
.
* middleware/monitor: revert changes to exported field "ChartJSURL"
This is a breaking change introduced in 167a8b5e94
.
* middleware/monitor: fix error checking
Fix the errorenous error checking introduced in 167a8b5e94
.
* 🐛 Bug: Fix issues introduced in linting PR #2319
* 🐛 Bug: Fix issues introduced in linting PR #2319
* Bug: Fix issues introduced in linting PR #2319
---------
Co-authored-by: René Werner <rene@gofiber.io>
2023-02-02 15:57:40 +01:00
leonklingele
167a8b5e94
🚀 Feature: Add and apply more stricter golangci-lint linting rules ( #2286 )
...
* golangci-lint: add and apply more stricter linting rules
* github: drop security workflow now that we use gosec linter inside golangci-lint
* github: use official golangci-lint CI linter
* Add editorconfig and gitattributes file
2023-01-27 09:01:37 +01:00
M. Efe Çetin
5406560033
🧹 chore: make most tests parallel ( #2299 )
...
* 🧹 chore: make most tests parallel
* revert some tests
* revert some tests
* revert some tests
2023-01-15 23:21:37 +08:00
leonklingele
17dfcc756b
middleware/requestid: mention that the default UUID generator exposes the number of requests made to the server ( #2241 )
2022-12-01 09:11:14 +01:00
Kris Carr
f26d9b1d4e
v3 (deps): update to use gofiber/utils/v2 ( #2184 )
2022-10-31 16:44:53 +03:00
Muhammed Efe Çetin
ca6f25a890
➕ v3 (deps): move `utils` to ` https://github.com/gofiber/utils `
2022-09-23 21:19:44 +03:00
Trim21
c964fda009
v3(tests): use testify for assertion ( #2036 )
...
* replace
* write
* rewrite more
* rewrite
* rewrite
* fix
* rewrite
2022-08-22 07:57:10 +02:00
Muhammed Efe Çetin
4105b008c2
Merge remote-tracking branch 'origin/master' into v3-beta
2022-08-19 14:33:31 +03:00
M. Efe Çetin
a458bd344c
✨ v3 (feature): convert fiber.Ctx type to interface ( #1928 )
...
* ✨ v3: convert fiber.Ctx type to interface
* update ctx methods
* add new methods to customize ctx, fix some problems
* update comments.
* fix something
2022-07-13 07:48:29 +02:00
Muhammed Efe Çetin
1188144d78
🎉 v3: init
2022-05-31 17:35:49 +03:00
Nick Smith
1b00264385
Fix typos in middleware ( #1714 )
...
Co-authored-by: GitHub Actions <41898282+github-actions[bot]@users.noreply.github.com>
2022-01-14 22:31:44 -05:00
Fenny
687717f113
🛠 separate config
2020-11-11 14:03:16 +01:00
LeoZhan
00750b8989
refactor: format the code
2020-11-01 00:32:01 +08:00
Tom
7eaf3c07b1
📦 Change requestId -> requestid
2020-10-22 10:00:06 +01:00
Tom
c5792a3953
📦 Add the request ID to locals
2020-10-21 20:14:12 +01:00
Konstantinos Lypitkas
67a45db8e2
Add test assertion to requestid
2020-10-12 19:05:48 +03:00
Konstantinos Lypitkas
9d4a83a55b
Minor refactor for clarity
2020-10-12 19:05:27 +03:00
Juan Camilo Varela López
dfc141660d
fix name prop in doc
...
the prop Generetor doesn't exists, is Generator
2020-09-30 13:42:02 -05:00
kiyon
616ff8f532
👷 remove unnecessary fiber app config
2020-09-17 13:41:06 +08:00
kiyon
e13411e184
👷 improve mw test cases
...
add Next test case
2020-09-16 09:44:05 +08:00
Fenny
2768ea2a77
🙌 make utils public
...
Co-Authored-By: RW <7063188+ReneWerner87@users.noreply.github.com>
2020-09-14 12:12:29 +02:00
Fenny
a3cac71ae8
🔦 move utils to internal
2020-09-14 09:09:06 +02:00
Fenny
ec5d66e7a8
⚡ v2
2020-09-13 11:20:11 +02:00